Skip to content

Commit 0243b14

Browse files
sp1kerAkryum
authored andcommitted
fix: error on edit data of component without properties in devtools (vuejs#907)
1 parent 26b2ed7 commit 0243b14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ export function get (object, path) {
524524
}
525525

526526
export function has (object, path, parent = false) {
527+
if (typeof object === 'undefined') {
528+
return false
529+
}
530+
527531
const sections = path.split('.')
528532
const size = !parent ? 1 : 2
529533
while (sections.length > size) {

0 commit comments

Comments
 (0)