diff --git a/src/def.d.ts b/src/def.d.ts index d8df96b..68fb37a 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -235,6 +235,7 @@ interface VendettaObject { copyText: (content: string) => void; findInReactTree: (tree: { [key: string]: any }, filter: SearchFilter) => void; findInTree: (tree: { [key: string]: any }, filter: SearchFilter, options: FindInTreeOptions) => any; + unfreeze: (obj: object) => object; }; debug: { connectToDebugger: (url: string) => void; diff --git a/src/lib/utils/unfreeze.ts b/src/lib/utils/unfreeze.ts index 1e12e44..3bcdbc7 100644 --- a/src/lib/utils/unfreeze.ts +++ b/src/lib/utils/unfreeze.ts @@ -1,6 +1,6 @@ // https://stackoverflow.com/a/68339174 -export function unfreeze(obj: object) { +export default function unfreeze(obj: object) { if (Object.isFrozen(obj)) { return Object.assign({}, obj); } diff --git a/src/lib/windowObject.ts b/src/lib/windowObject.ts index 197664b..4a4870f 100644 --- a/src/lib/windowObject.ts +++ b/src/lib/windowObject.ts @@ -5,6 +5,7 @@ import settings from "@lib/settings"; import copyText from "@utils/copyText"; import findInReactTree from "@utils/findInReactTree"; import findInTree from "@utils/findInTree"; +import unfreeze from "@utils/unfreeze"; import * as constants from "@lib/constants"; import * as debug from "@lib/debug"; import * as plugins from "@lib/plugins"; @@ -29,9 +30,10 @@ export default async function windowObject(unloads: any[]): Promise