diff --git a/assets/javascripts/discourse/components/explorer-schema.js.es6 b/assets/javascripts/discourse/components/explorer-schema.js.es6 index 54f12b3..2965549 100644 --- a/assets/javascripts/discourse/components/explorer-schema.js.es6 +++ b/assets/javascripts/discourse/components/explorer-schema.js.es6 @@ -1,3 +1,5 @@ +import debounce from 'discourse/lib/debounce'; + export default Ember.Component.extend({ actions: { @@ -111,7 +113,7 @@ export default Ember.Component.extend({ return tables; }, - triggerFilter: Discourse.debounce(function() { + triggerFilter: debounce(function() { this.set('filteredTables', this.filterTables(this.get('transformedSchema'))); this.set('loading', false); }, 500).observes('filter'), diff --git a/assets/javascripts/discourse/components/hljs-code-view.js.es6 b/assets/javascripts/discourse/components/hljs-code-view.js.es6 index 5f47af8..2cd2e9f 100644 --- a/assets/javascripts/discourse/components/hljs-code-view.js.es6 +++ b/assets/javascripts/discourse/components/hljs-code-view.js.es6 @@ -1,3 +1,4 @@ +import debounce from 'discourse/lib/debounce'; import highlightSyntax from 'discourse/lib/highlight-syntax'; export default Ember.Component.extend({ @@ -7,7 +8,7 @@ export default Ember.Component.extend({ buffer.push(""); }, - _refreshHighlight: Discourse.debounce(function() { + _refreshHighlight: debounce(function() { this.rerender(); }, 50).observes('value'),