diff --git a/src/util.js b/src/util.js index 9da143a91..fe16fae5a 100644 --- a/src/util.js +++ b/src/util.js @@ -524,6 +524,10 @@ export function get (object, path) { } export function has (object, path, parent = false) { + if (typeof object === 'undefined') { + return false + } + const sections = path.split('.') const size = !parent ? 1 : 2 while (sections.length > size) {