@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.
- package/dist/browser/index.mjs +2 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/index.cjs +11 -5
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +11 -5
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/A-Feature/A-Feature-Extend.decorator.ts +23 -7
- package/tests/A-Feature.test.ts +10 -19
package/dist/node/index.mjs
CHANGED
|
@@ -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
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
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
|
}
|