diff --git a/package-lock.json b/package-lock.json index 721818c7..9f27482e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3476,15 +3476,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -3496,6 +3487,15 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/src/core.js b/src/core.js index ace2fda0..584f7c07 100644 --- a/src/core.js +++ b/src/core.js @@ -209,6 +209,9 @@ module.exports = function core(defaultLibraryName) { }, AssignmentExpression(path, { opts }) { + if (!path.hub) { + return; + } const { node } = path; const { file } = path.hub; @@ -219,6 +222,9 @@ module.exports = function core(defaultLibraryName) { }, ArrayExpression(path, { opts }) { + if (!path.hub) { + return; + } const { elements } = path.node; const { file } = path.hub;