@adaas/a-concept 0.3.5 → 0.3.6

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.
@@ -2812,14 +2812,20 @@ function A_Feature_Extend(param1) {
2812
2812
  const existedMetaValue = [
2813
2813
  ...existedMeta.get(targetRegexp.source) || []
2814
2814
  ];
2815
+ const currentFeatureName = param1 && typeof param1 === "object" && !A_TypeGuards.isRegExp(param1) && param1.name || propertyKey;
2815
2816
  for (const [key, handlers] of existedMeta.entries()) {
2816
2817
  const indexInAnother = handlers.findIndex((item) => item.handler === propertyKey);
2817
2818
  if (key !== targetRegexp.source && indexInAnother !== -1) {
2818
- handlers.splice(indexInAnother, 1);
2819
- if (handlers.length === 0) {
2820
- existedMeta.delete(key);
2821
- } else {
2822
- existedMeta.set(key, handlers);
2819
+ const keyStr = String(key);
2820
+ const featureNameMatch = keyStr.match(/\\\.\s*([^\\.$]+)\$$/);
2821
+ const otherFeatureName = featureNameMatch ? featureNameMatch[1] : null;
2822
+ if (otherFeatureName === currentFeatureName) {
2823
+ handlers.splice(indexInAnother, 1);
2824
+ if (handlers.length === 0) {
2825
+ existedMeta.delete(key);
2826
+ } else {
2827
+ existedMeta.set(key, handlers);
2828
+ }
2823
2829
  }
2824
2830
  }
2825
2831
  }