FIX: Don't use prototype extensions like .observes

This commit is contained in:
Robin Ward 2020-07-17 15:23:26 -04:00
parent 394b5db848
commit 683a1210e3

View File

@ -1,13 +1,14 @@
import Component from "@ember/component";
import highlightSearch from "discourse/lib/highlight-search";
import { observes, on } from "discourse-common/utils/decorators";
export default Component.extend({
tagName: "span",
@on("didInsertElement")
@observes("highlight")
_highlightOnInsert: function() {
const term = this.highlight;
highlightSearch(this.element, term);
}
.observes("highlight")
.on("didInsertElement")
});