From d79f667a9b3c498e7e800c781938636bfbd60c59 Mon Sep 17 00:00:00 2001 From: Kane York Date: Wed, 15 Jul 2015 16:16:07 -0700 Subject: [PATCH] Use this.site.categories --- assets/javascripts/discourse/components/param-input.js.es6 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/param-input.js.es6 b/assets/javascripts/discourse/components/param-input.js.es6 index 0c869dc..2f68f77 100644 --- a/assets/javascripts/discourse/components/param-input.js.es6 +++ b/assets/javascripts/discourse/components/param-input.js.es6 @@ -83,13 +83,12 @@ export default Ember.Component.extend({ case 'post_id': return isPositiveInt || /\d+\/\d+(\?u=.*)?$/.test(value); case 'category_id': - const cats = Category.list(); if (!isPositiveInt && value !== value.dasherize()) { this.set('value', value.dasherize()); } if (isPositiveInt) { - return !!cats.find(function(c) { + return !!this.site.categories.find(function(c) { return c.get('id') === intVal; }); } else if (/\//.test(value)) {