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