diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b973752 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +tag-version-prefix="" \ No newline at end of file diff --git a/tags.js b/tags.js index 954799b..b8b28de 100644 --- a/tags.js +++ b/tags.js @@ -726,7 +726,8 @@ class Tags { if (!text) { return false; } - if(this.isDisabled()) { + // Check disabled + if (this.isDisabled()) { return false; } // Check already selected input (single will replace) diff --git a/test/tags.test.js b/test/tags.test.js index 6824045..6fa2965 100644 --- a/test/tags.test.js +++ b/test/tags.test.js @@ -82,6 +82,7 @@ test("it prevents adding if necessary", (t) => { t.falsy(disabledTags.canAdd("test")); // Let's add one then test + t.truthy(maxTags.canAdd("test")); maxTags.addItem("test"); t.falsy(maxTags.canAdd("test")); });