diff options
author | Florian Dold <florian@dold.me> | 2021-12-09 18:19:48 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-12-09 18:19:48 +0100 |
commit | 38d8239f937de047f127d37cd23ca6829db8e3e4 (patch) | |
tree | cf53054ab4d1322b7f29b3e6b9e2f0064172c2ca /packages/idb-bridge/src/util/structuredClone.ts | |
parent | 423af144eeca3158fd714cf54710ea042b6a0031 (diff) | |
download | wallet-core-38d8239f937de047f127d37cd23ca6829db8e3e4.tar.xz |
idb-bridge: use lodash cloneDeep
Diffstat (limited to 'packages/idb-bridge/src/util/structuredClone.ts')
-rw-r--r-- | packages/idb-bridge/src/util/structuredClone.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/idb-bridge/src/util/structuredClone.ts b/packages/idb-bridge/src/util/structuredClone.ts index 181e9ca0e..b6b537433 100644 --- a/packages/idb-bridge/src/util/structuredClone.ts +++ b/packages/idb-bridge/src/util/structuredClone.ts @@ -14,6 +14,8 @@ permissions and limitations under the License. */ +import cloneDeep from "lodash/cloneDeep"; + const { toString: toStr } = {}; const hasOwn = {}.hasOwnProperty; const getProto = Object.getPrototypeOf; @@ -260,5 +262,5 @@ export function structuredRevive(val: any): any { * Structured clone for IndexedDB. */ export function structuredClone(val: any): any { - return structuredRevive(structuredEncapsulate(val)); + return cloneDeep(val); } |