Skip to content

Commit 49f06ca

Browse files
fix: deepfreeze check by prop (#5407)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent 4036e15 commit 49f06ca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changes/fix-tauri-pattern-freeze.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes `__TAURI_PATTERN__` object freeze.

core/tauri/scripts/pattern.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
const props = Object.getOwnPropertyNames(object)
88

99
for (const prop of props) {
10-
if (typeof object[name] === 'object') {
11-
__tauriDeepFreeze(object[name])
10+
if (typeof object[prop] === 'object') {
11+
__tauriDeepFreeze(object[prop])
1212
}
1313
}
1414

0 commit comments

Comments
 (0)