js-code-detector 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -570,12 +570,15 @@ var _AstUtil = class {
570
570
  if (id.type === "ObjectPattern") {
571
571
  const properties = id.properties;
572
572
  for (const property of properties) {
573
- if (property.type === "Property") {
574
- const value = property.value;
575
- this._deepFindIdentifier(value, callback);
576
- } else if (property.type === "RestElement") {
573
+ if (property.type === "RestElement") {
577
574
  const argument = property.argument;
578
575
  this._deepFindIdentifier(argument, callback);
576
+ } else {
577
+ const { value, key, computed } = property;
578
+ this._deepFindIdentifier(value, callback);
579
+ if (computed) {
580
+ this._deepFindIdentifier(key, callback);
581
+ }
579
582
  }
580
583
  }
581
584
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-code-detector",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",