Skip to content

A platform for community discussion. Free, open, simple.

DEV: optimize fix for sub-categories not getting pre-filled.

Arpit Jalan102be5a9e3a0
diff --git a/app/assets/javascripts/discourse/routes/new-topic.js.es6 b/app/assets/javascripts/discourse/routes/new-topic.js.es6
index da9ebf7c40c..266276fd064 100644
--- a/app/assets/javascripts/discourse/routes/new-topic.js.es6
+++ b/app/assets/javascripts/discourse/routes/new-topic.js.es6
@@ -84,7 +84,7 @@ export default Discourse.Route.extend({
category = categories.find(item => {
return (
item &&
- item.get(type) === subCategory.toLowerCase() &&
+ item[type] === subCategory.toLowerCase() &&
item.parent_category_id === main.id
);
});