From 37fe36778ba6993e36e8b5d74ece023d34fb3baf Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 17 Feb 2016 17:17:43 -0500 Subject: [PATCH] FIX: Deprecated debounce function --- .../javascripts/discourse/components/explorer-schema.js.es6 | 4 +++- assets/javascripts/discourse/components/hljs-code-view.js.es6 | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) 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'),