@rulebricks/sdk 2.5.3 → 2.5.4
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/forge/rule.js +1 -1
- package/forge/rule.js +1 -1
- package/package.json +1 -1
package/dist/forge/rule.js
CHANGED
|
@@ -310,7 +310,7 @@ class Rule {
|
|
|
310
310
|
throw new Error("Alias cannot contain special characters");
|
|
311
311
|
}
|
|
312
312
|
const rules = yield this.workspace.assets.rules.list();
|
|
313
|
-
if (rules.some((r) => r.slug === alias)) {
|
|
313
|
+
if (rules.some((r) => r.slug === alias && r.id !== this.id)) {
|
|
314
314
|
throw new Error("Alias conflicts with an existing rule");
|
|
315
315
|
}
|
|
316
316
|
this.slug = alias;
|
package/forge/rule.js
CHANGED
|
@@ -310,7 +310,7 @@ class Rule {
|
|
|
310
310
|
throw new Error("Alias cannot contain special characters");
|
|
311
311
|
}
|
|
312
312
|
const rules = yield this.workspace.assets.rules.list();
|
|
313
|
-
if (rules.some((r) => r.slug === alias)) {
|
|
313
|
+
if (rules.some((r) => r.slug === alias && r.id !== this.id)) {
|
|
314
314
|
throw new Error("Alias conflicts with an existing rule");
|
|
315
315
|
}
|
|
316
316
|
this.slug = alias;
|