From 7190cd84b4d45c225b6a39216ed3b1c0f48da003 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Sun, 15 May 2016 20:58:29 +0900 Subject: [PATCH] Use the variables that are already instantiated --- extensions/tags/js/forum/dist/extension.js | 4 ++-- extensions/tags/js/forum/src/components/TagDiscussionModal.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/tags/js/forum/dist/extension.js b/extensions/tags/js/forum/dist/extension.js index 790ff4f40..014af4da1 100644 --- a/extensions/tags/js/forum/dist/extension.js +++ b/extensions/tags/js/forum/dist/extension.js @@ -553,13 +553,13 @@ System.register('flarum/tags/components/TagDiscussionModal', ['flarum/components // If the number of selected primary/secondary tags is at the maximum, then // we'll filter out all other tags of that type. - if (primaryCount >= app.forum.attribute('maxPrimaryTags')) { + if (primaryCount >= this.maxPrimary) { tags = tags.filter(function (tag) { return !tag.isPrimary() || _this2.selected.indexOf(tag) !== -1; }); } - if (secondaryCount >= app.forum.attribute('maxSecondaryTags')) { + if (secondaryCount >= this.maxSecondary) { tags = tags.filter(function (tag) { return tag.isPrimary() || _this2.selected.indexOf(tag) !== -1; }); diff --git a/extensions/tags/js/forum/src/components/TagDiscussionModal.js b/extensions/tags/js/forum/src/components/TagDiscussionModal.js index 84dbc0110..29e8e9c41 100644 --- a/extensions/tags/js/forum/src/components/TagDiscussionModal.js +++ b/extensions/tags/js/forum/src/components/TagDiscussionModal.js @@ -116,11 +116,11 @@ export default class TagDiscussionModal extends Modal { // If the number of selected primary/secondary tags is at the maximum, then // we'll filter out all other tags of that type. - if (primaryCount >= app.forum.attribute('maxPrimaryTags')) { + if (primaryCount >= this.maxPrimary) { tags = tags.filter(tag => !tag.isPrimary() || this.selected.indexOf(tag) !== -1); } - if (secondaryCount >= app.forum.attribute('maxSecondaryTags')) { + if (secondaryCount >= this.maxSecondary) { tags = tags.filter(tag => tag.isPrimary() || this.selected.indexOf(tag) !== -1); }