mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 11:02:46 +08:00
FIX: Don't use prototype extensions like .observes
This commit is contained in:
parent
394b5db848
commit
683a1210e3
|
@ -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")
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user