mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:35:03 +08:00
FIX: error with tags enabled and no tags created (#6701)
This commit is contained in:
@ -83,3 +83,24 @@ componentTest("default", {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("no tags", {
|
||||
template: "{{tag-drop}}",
|
||||
|
||||
beforeEach() {
|
||||
this.site.set("can_create_tag", true);
|
||||
this.set("site.top_tags", undefined);
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
.rowByIndex(1)
|
||||
.name(),
|
||||
undefined,
|
||||
"it has no tags and doesn’t crash"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user