fix: deepfreeze check by prop (#5407)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Pedro Luiz Cabral Salomon Prado
2022-10-17 10:59:06 -03:00
committed by GitHub
parent 4036e15f5a
commit 49f06ca4b9
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Fixes `__TAURI_PATTERN__` object freeze.

View File

@@ -7,8 +7,8 @@
const props = Object.getOwnPropertyNames(object)
for (const prop of props) {
if (typeof object[name] === 'object') {
__tauriDeepFreeze(object[name])
if (typeof object[prop] === 'object') {
__tauriDeepFreeze(object[prop])
}
}