diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 033e043d43d..46bf6825767 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -49,6 +49,7 @@ //= require ./discourse/models/permission-type //= require ./discourse/models/user-action-group //= require ./discourse/models/input-validation +//= require ./discourse/models/trust-level //= require ./discourse/lib/search //= require ./discourse/lib/user-search //= require ./discourse/lib/export-csv diff --git a/app/assets/javascripts/discourse/models/site.js.es6 b/app/assets/javascripts/discourse/models/site.js.es6 index 07dc4d72b3a..bb76b07a0ea 100644 --- a/app/assets/javascripts/discourse/models/site.js.es6 +++ b/app/assets/javascripts/discourse/models/site.js.es6 @@ -7,6 +7,7 @@ import Archetype from "discourse/models/archetype"; import PostActionType from "discourse/models/post-action-type"; import Singleton from "discourse/mixins/singleton"; import RestModel from "discourse/models/rest"; +import TrustLevel from "discourse/models/trust-level"; import PreloadStore from "preload-store"; const Site = RestModel.extend({ @@ -176,9 +177,7 @@ Site.reopenClass(Singleton, { } if (result.trust_levels) { - result.trustLevels = result.trust_levels.map(tl => - Discourse.TrustLevel.create(tl) - ); + result.trustLevels = result.trust_levels.map(tl => TrustLevel.create(tl)); delete result.trust_levels; } diff --git a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb index 21e786665fe..dd9392764d8 100644 --- a/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb +++ b/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb @@ -89,7 +89,6 @@ JS "discourse/models/user-action", "discourse/routes/discourse", "discourse/models/category", - "discourse/models/trust-level", "discourse/models/site", "discourse/models/user", "discourse/models/session",