From 275f9dc0bdf3e58aa36b800f55f8648fbc55d8af Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 4 Jan 2024 11:07:54 +0800 Subject: upgrade --- node_modules/@babel/traverse/lib/path/removal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'node_modules/@babel/traverse/lib/path/removal.js') diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/traverse/lib/path/removal.js index 7b1ce871..aa61f9a6 100644 --- a/node_modules/@babel/traverse/lib/path/removal.js +++ b/node_modules/@babel/traverse/lib/path/removal.js @@ -36,8 +36,10 @@ function _removeFromScope() { Object.keys(bindings).forEach(name => this.scope.removeBinding(name)); } function _callRemovalHooks() { - for (const fn of _removalHooks.hooks) { - if (fn(this, this.parentPath)) return true; + if (this.parentPath) { + for (const fn of _removalHooks.hooks) { + if (fn(this, this.parentPath)) return true; + } } } function _remove() { -- cgit v1.2.3