diff --git a/assets/javascripts/wizard-custom-globals.js b/assets/javascripts/wizard-custom-globals.js
index e37648e5..9510184b 100644
--- a/assets/javascripts/wizard-custom-globals.js
+++ b/assets/javascripts/wizard-custom-globals.js
@@ -1,4 +1,5 @@
-window.Discourse = {}
+/* eslint no-undef: 0*/
+window.Discourse = {};
window.Wizard = {};
Wizard.SiteSettings = {};
Discourse.__widget_helpers = {};
diff --git a/assets/javascripts/wizard-custom-guest.js b/assets/javascripts/wizard-custom-guest.js
index dc2f6430..1e77ef88 100644
--- a/assets/javascripts/wizard-custom-guest.js
+++ b/assets/javascripts/wizard-custom-guest.js
@@ -1,4 +1,4 @@
(function () {
document.cookie = 'destination_url=' + window.location.href + ';path=/';
- window.location.href = '/login'
-})()
+ window.location.href = '/login';
+})();
diff --git a/assets/javascripts/wizard-custom-start.js b/assets/javascripts/wizard-custom-start.js
index 99937b5f..0c62404c 100644
--- a/assets/javascripts/wizard-custom-start.js
+++ b/assets/javascripts/wizard-custom-start.js
@@ -1,4 +1,4 @@
(function() {
- var wizard = require('discourse/plugins/discourse-custom-wizard/wizard/custom-wizard').default.create();
+ let wizard = require('discourse/plugins/discourse-custom-wizard/wizard/custom-wizard').default.create();
wizard.start();
})();
diff --git a/assets/javascripts/wizard/components/custom-user-selector.js.es6 b/assets/javascripts/wizard/components/custom-user-selector.js.es6
index ee88645c..b2f08ede 100644
--- a/assets/javascripts/wizard/components/custom-user-selector.js.es6
+++ b/assets/javascripts/wizard/components/custom-user-selector.js.es6
@@ -5,6 +5,8 @@ import {
import { renderAvatar } from "discourse/helpers/user-avatar";
import userSearch from "../lib/user-search";
import WizardI18n from "../lib/wizard-i18n";
+import Handlebars from "handlebars";
+import { isEmpty } from "@ember/utils";
const template = function (params) {
const options = params.options;
@@ -43,13 +45,14 @@ export default Ember.TextField.extend({
@observes("usernames")
_update() {
- if (this.get("canReceiveUpdates") === "true")
+ if (this.get("canReceiveUpdates") === "true") {
this.didInsertElement({ updateData: true });
+ }
},
didInsertElement(opts) {
this._super();
- var self = this,
+ let self = this,
selected = [],
groups = [],
currentUser = this.currentUser,
@@ -82,7 +85,7 @@ export default Ember.TextField.extend({
dataSource(term) {
const termRegex = /[^a-zA-Z0-9_\-\.@\+]/;
- var results = userSearch({
+ let results = userSearch({
term: term.replace(termRegex, ""),
topicId: self.get("topicId"),
exclude: excludedUsernames(),
@@ -102,7 +105,7 @@ export default Ember.TextField.extend({
}
return v.username || v.name;
} else {
- var excludes = excludedUsernames();
+ let excludes = excludedUsernames();
return v.usernames.filter(function (item) {
return excludes.indexOf(item) === -1;
});
@@ -110,7 +113,7 @@ export default Ember.TextField.extend({
},
onChangeItems(items) {
- var hasGroups = false;
+ let hasGroups = false;
items = items.map(function (i) {
if (groups.indexOf(i) > -1) {
hasGroups = true;
@@ -121,7 +124,9 @@ export default Ember.TextField.extend({
self.set("hasGroups", hasGroups);
selected = items;
- if (self.get("onChangeCallback")) self.sendAction("onChangeCallback");
+ if (self.get("onChangeCallback")) {
+ self.sendAction("onChangeCallback");
+ }
},
reverseTransform(i) {
@@ -139,7 +144,7 @@ export default Ember.TextField.extend({
@observes("usernames")
_clearInput: function () {
if (arguments.length > 1) {
- if (Em.isEmpty(this.get("usernames"))) {
+ if (isEmpty(this.get("usernames"))) {
$(this.element).parent().find("a").click();
}
}
diff --git a/assets/javascripts/wizard/components/field-validators.js.es6 b/assets/javascripts/wizard/components/field-validators.js.es6
index 85811076..a315020d 100644
--- a/assets/javascripts/wizard/components/field-validators.js.es6
+++ b/assets/javascripts/wizard/components/field-validators.js.es6
@@ -1,5 +1,4 @@
import Component from "@ember/component";
-import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
actions: {
perform() {
diff --git a/assets/javascripts/wizard/components/similar-topics-validator.js.es6 b/assets/javascripts/wizard/components/similar-topics-validator.js.es6
index 17c8964a..98ea9270 100644
--- a/assets/javascripts/wizard/components/similar-topics-validator.js.es6
+++ b/assets/javascripts/wizard/components/similar-topics-validator.js.es6
@@ -1,11 +1,10 @@
import WizardFieldValidator from "../../wizard/components/validator";
import { deepMerge } from "discourse-common/lib/object";
-import { observes } from "discourse-common/utils/decorators";
+import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { cancel, later } from "@ember/runloop";
import { A } from "@ember/array";
import EmberObject, { computed } from "@ember/object";
-import { notEmpty, and, equal, empty } from "@ember/object/computed";
-import discourseComputed from "discourse-common/utils/decorators";
+import { and, equal, notEmpty } from "@ember/object/computed";
import { categoryBadgeHTML } from "discourse/helpers/category-link";
import { dasherize } from "@ember/string";
@@ -16,7 +15,7 @@ export default WizardFieldValidator.extend({
hasSimilarTopics: notEmpty("similarTopics"),
hasNotSearched: equal("similarTopics", null),
noSimilarTopics: computed("similarTopics", function () {
- return this.similarTopics !== null && this.similarTopics.length == 0;
+ return this.similarTopics !== null && this.similarTopics.length === 0;
}),
showSimilarTopics: computed("typing", "hasSimilarTopics", function () {
return this.hasSimilarTopics && !this.typing;
@@ -35,8 +34,9 @@ export default WizardFieldValidator.extend({
@discourseComputed("validation.categories")
validationCategories(categoryIds) {
- if (categoryIds)
+ if (categoryIds) {
return categoryIds.map((id) => this.site.categoriesById[id]);
+ }
return A();
},
@@ -78,15 +78,18 @@ export default WizardFieldValidator.extend({
@discourseComputed("currentState")
currentStateClass(currentState) {
- if (currentState) return `similar-topics-${dasherize(currentState)}`;
+ if (currentState) {
+ return `similar-topics-${dasherize(currentState)}`;
+ }
return "similar-topics";
},
@discourseComputed("currentState")
currentStateKey(currentState) {
- if (currentState)
+ if (currentState) {
return `realtime_validations.similar_topics.${currentState}`;
+ }
return false;
},
diff --git a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6
index 5e7fc5fe..2a92f12a 100644
--- a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6
+++ b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6
@@ -4,22 +4,18 @@ import {
on,
} from "discourse-common/utils/decorators";
import { findRawTemplate } from "discourse-common/lib/raw-templates";
-import { throttle } from "@ember/runloop";
-import { scheduleOnce, next } from "@ember/runloop";
-import {
- safariHacksDisabled,
- caretPosition,
- inCodeBlock,
-} from "discourse/lib/utilities";
+import { next, scheduleOnce, throttle } from "@ember/runloop";
+import { caretPosition, inCodeBlock } from "discourse/lib/utilities";
import highlightSyntax from "discourse/lib/highlight-syntax";
import { getToken } from "wizard/lib/ajax";
import {
- validateUploadedFiles,
+ displayErrorForUpload,
getUploadMarkdown,
+ uploadIcon,
+ validateUploadedFiles,
} from "discourse/lib/uploads";
import { cacheShortUploadUrl } from "pretty-text/upload-short-url";
import { alias } from "@ember/object/computed";
-import { uploadIcon } from "discourse/lib/uploads";
import WizardI18n from "../lib/wizard-i18n";
const uploadMarkdownResolvers = [];
@@ -78,8 +74,8 @@ export default ComposerEditor.extend({
.join(",");
},
- @discourseComputed("currentUser")
- uploadIcon(currentUser) {
+ @discourseComputed()
+ uploadIcon() {
return uploadIcon(false, this.siteSettings);
},
@@ -295,7 +291,7 @@ export default ComposerEditor.extend({
shortcut: "K",
trimLeading: true,
unshift: true,
- sendAction: (event) => component.set("showHyperlinkBox", true),
+ sendAction: () => component.set("showHyperlinkBox", true),
});
},
diff --git a/assets/javascripts/wizard/components/wizard-field-category.js.es6 b/assets/javascripts/wizard/components/wizard-field-category.js.es6
index 913742d5..a7452214 100644
--- a/assets/javascripts/wizard/components/wizard-field-category.js.es6
+++ b/assets/javascripts/wizard/components/wizard-field-category.js.es6
@@ -12,7 +12,9 @@ export default Ember.Component.extend({
[...value].reduce((result, v) => {
let val =
property === "id" ? Category.findById(v) : Category.findBySlug(v);
- if (val) result.push(val);
+ if (val) {
+ result.push(val);
+ }
return result;
}, [])
);
diff --git a/assets/javascripts/wizard/components/wizard-no-access.js.es6 b/assets/javascripts/wizard/components/wizard-no-access.js.es6
index c0edb58a..57fe9111 100644
--- a/assets/javascripts/wizard/components/wizard-no-access.js.es6
+++ b/assets/javascripts/wizard/components/wizard-no-access.js.es6
@@ -2,6 +2,7 @@ import CustomWizard from "../models/custom";
export default Ember.Component.extend({
siteName: function () {
+ /*eslint no-undef:0*/
return Wizard.SiteSettings.title;
}.property(),
diff --git a/assets/javascripts/wizard/components/wizard-similar-topics.js.es6 b/assets/javascripts/wizard/components/wizard-similar-topics.js.es6
index 74b1e358..687cfa86 100644
--- a/assets/javascripts/wizard/components/wizard-similar-topics.js.es6
+++ b/assets/javascripts/wizard/components/wizard-similar-topics.js.es6
@@ -15,7 +15,9 @@ export default Component.extend({
},
documentClick(e) {
- if (this._state == "destroying") return;
+ if (this._state === "destroying") {
+ return;
+ }
let $target = $(e.target);
if (!$target.hasClass("show-topics")) {
diff --git a/assets/javascripts/wizard/components/wizard-text-field.js.es6 b/assets/javascripts/wizard/components/wizard-text-field.js.es6
index 187deea9..c522eb2c 100644
--- a/assets/javascripts/wizard/components/wizard-text-field.js.es6
+++ b/assets/javascripts/wizard/components/wizard-text-field.js.es6
@@ -1,7 +1,7 @@
-/* eslint no-undef: 0 */
+/* eslint no-undef: 0*/
import computed from "discourse-common/utils/decorators";
-import { siteDir, isRTL, isLTR } from "discourse/lib/text-direction";
+import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
import WizardI18n from "../lib/wizard-i18n";
export default Ember.TextField.extend({
diff --git a/assets/javascripts/wizard/helpers/char-counter.js.es6 b/assets/javascripts/wizard/helpers/char-counter.js.es6
index b666d0bf..a700a432 100644
--- a/assets/javascripts/wizard/helpers/char-counter.js.es6
+++ b/assets/javascripts/wizard/helpers/char-counter.js.es6
@@ -1,5 +1,6 @@
import { registerUnbound } from "discourse-common/lib/helpers";
import I18n from "I18n";
+import Handlebars from "handlebars";
export default registerUnbound("char-counter", function (body, maxLength) {
let bodyLength = body ? body.length : 0;
@@ -9,11 +10,11 @@ export default registerUnbound("char-counter", function (body, maxLength) {
let isOverMax = bodyLength > maxLength ? "true" : "false";
finalString = `
${bodyLength} / ${I18n.t(
"wizard.x_characters",
- { count: parseInt(maxLength) }
+ { count: parseInt(maxLength, 10) }
)}
`;
} else {
finalString = `${I18n.t("wizard.x_characters", {
- count: parseInt(bodyLength),
+ count: parseInt(bodyLength, 10),
})}
`;
}
diff --git a/assets/javascripts/wizard/helpers/date-node.js.es6 b/assets/javascripts/wizard/helpers/date-node.js.es6
index 99fa01f3..b7d19d0f 100644
--- a/assets/javascripts/wizard/helpers/date-node.js.es6
+++ b/assets/javascripts/wizard/helpers/date-node.js.es6
@@ -1,5 +1,6 @@
import { registerUnbound } from "discourse-common/lib/helpers";
-import { longDate, number, relativeAge } from "discourse/lib/formatter";
+import { longDate, relativeAge } from "discourse/lib/formatter";
+import Handlebars from "handlebars";
export default registerUnbound("date-node", function (dt) {
if (typeof dt === "string") {
diff --git a/assets/javascripts/wizard/helpers/dir-span.js.es6 b/assets/javascripts/wizard/helpers/dir-span.js.es6
index a750720a..45720796 100644
--- a/assets/javascripts/wizard/helpers/dir-span.js.es6
+++ b/assets/javascripts/wizard/helpers/dir-span.js.es6
@@ -1,4 +1,5 @@
import { registerUnbound } from "discourse-common/lib/helpers";
+import Handlebars from "handlebars";
export default registerUnbound("dir-span", function (str) {
return new Handlebars.SafeString(str);
diff --git a/assets/javascripts/wizard/helpers/loading-spinner.es6 b/assets/javascripts/wizard/helpers/loading-spinner.es6
index fda8fe6b..5f15403d 100644
--- a/assets/javascripts/wizard/helpers/loading-spinner.es6
+++ b/assets/javascripts/wizard/helpers/loading-spinner.es6
@@ -1,15 +1,17 @@
-import { htmlHelper } from 'discourse-common/lib/helpers';
+import { htmlHelper } from "discourse-common/lib/helpers";
function renderSpinner(cssClass) {
var html = "";
}
var spinnerHTML = renderSpinner();
-export default htmlHelper(params => {
+export default htmlHelper((params) => {
const hash = params.hash;
- return renderSpinner((hash && hash.size) ? hash.size : undefined);
+ return renderSpinner(hash && hash.size ? hash.size : undefined);
});
export { spinnerHTML, renderSpinner };
diff --git a/assets/javascripts/wizard/helpers/plugin-outlet.js.es6 b/assets/javascripts/wizard/helpers/plugin-outlet.js.es6
index adbbd777..e6ff81a6 100644
--- a/assets/javascripts/wizard/helpers/plugin-outlet.js.es6
+++ b/assets/javascripts/wizard/helpers/plugin-outlet.js.es6
@@ -1,5 +1,6 @@
import { registerUnbound } from "discourse-common/lib/helpers";
+import Handlebars from "handlebars";
-export default registerUnbound("plugin-outlet", function (attrs) {
+export default registerUnbound("plugin-outlet", function () {
return new Handlebars.SafeString("");
});
diff --git a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6
index 9d90d3fc..3ede2b05 100644
--- a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6
+++ b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6
@@ -3,8 +3,10 @@ import discourseComputed from "discourse-common/utils/decorators";
export default {
name: "custom-wizard-field",
- initialize(app) {
- if (window.location.pathname.indexOf("/w/") < 0) return;
+ initialize() {
+ if (window.location.pathname.indexOf("/w/") < 0) {
+ return;
+ }
const FieldComponent = requirejs("wizard/components/wizard-field").default;
const FieldModel = requirejs("wizard/models/wizard-field").default;
@@ -30,7 +32,9 @@ export default {
inputComponentName: function () {
const type = this.get("field.type");
const id = this.get("field.id");
- if (["text_only"].includes(type)) return false;
+ if (["text_only"].includes(type)) {
+ return false;
+ }
return dasherize(type === "component" ? id : `wizard-field-${type}`);
}.property("field.type", "field.id"),
});
diff --git a/assets/javascripts/wizard/initializers/custom-wizard-step.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard-step.js.es6
index 58137e7a..18fa9c70 100644
--- a/assets/javascripts/wizard/initializers/custom-wizard-step.js.es6
+++ b/assets/javascripts/wizard/initializers/custom-wizard-step.js.es6
@@ -1,7 +1,9 @@
export default {
name: "custom-wizard-step",
- initialize(app) {
- if (window.location.pathname.indexOf("/w/") < 0) return;
+ initialize() {
+ if (window.location.pathname.indexOf("/w/") < 0) {
+ return;
+ }
const CustomWizard = requirejs(
"discourse/plugins/discourse-custom-wizard/wizard/models/custom"
@@ -132,7 +134,9 @@ export default {
bannerImage: function () {
const src = this.get("step.banner");
- if (!src) return;
+ if (!src) {
+ return;
+ }
return getUrl(src);
}.property("step.banner"),
@@ -166,7 +170,7 @@ export default {
.finally(() => this.set("saving", false));
},
- keyPress(key) {},
+ keyPress() {},
actions: {
quit() {
diff --git a/assets/javascripts/wizard/initializers/custom-wizard.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard.js.es6
index 531f9475..ab7c9146 100644
--- a/assets/javascripts/wizard/initializers/custom-wizard.js.es6
+++ b/assets/javascripts/wizard/initializers/custom-wizard.js.es6
@@ -1,14 +1,13 @@
export default {
name: "custom-routes",
initialize(app) {
- if (window.location.pathname.indexOf("/w/") < 0) return;
+ if (window.location.pathname.indexOf("/w/") < 0) {
+ return;
+ }
const EmberObject = requirejs("@ember/object").default;
const Router = requirejs("wizard/router").default;
const ApplicationRoute = requirejs("wizard/routes/application").default;
- const CustomWizard = requirejs(
- "discourse/plugins/discourse-custom-wizard/wizard/models/custom"
- ).default;
const getUrl = requirejs("discourse-common/lib/get-url").default;
const Store = requirejs("discourse/models/store").default;
const registerRawHelpers = requirejs(
@@ -18,6 +17,7 @@ export default {
.createHelperContext;
const RawHandlebars = requirejs("discourse-common/lib/raw-handlebars")
.default;
+ const Handlebars = requirejs("handlebars").default;
const Site = requirejs(
"discourse/plugins/discourse-custom-wizard/wizard/models/site"
).default;
@@ -36,10 +36,12 @@ export default {
// IE11 Polyfill - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries#Polyfill
if (!Object.entries) {
Object.entries = function (obj) {
- var ownProps = Object.keys(obj),
+ let ownProps = Object.keys(obj),
i = ownProps.length,
resArray = new Array(i); // preallocate the Array
- while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];
+ while (i--) {
+ resArray[i] = [ownProps[i], obj[ownProps[i]]];
+ }
return resArray;
};
@@ -53,7 +55,7 @@ export default {
});
const targets = ["controller", "component", "route", "model", "adapter"];
-
+ /*eslint no-undef: 0*/
const siteSettings = Wizard.SiteSettings;
app.register("site-settings:main", siteSettings, { instantiate: false });
createHelperContext({ siteSettings });
diff --git a/assets/javascripts/wizard/lib/text-lite.js.es6 b/assets/javascripts/wizard/lib/text-lite.js.es6
index 72745e5a..4f9064a5 100644
--- a/assets/javascripts/wizard/lib/text-lite.js.es6
+++ b/assets/javascripts/wizard/lib/text-lite.js.es6
@@ -1,5 +1,6 @@
import loadScript from "./load-script";
import { default as PrettyText } from "pretty-text/pretty-text";
+import Handlebars from "handlebars";
export function cook(text, options) {
return new Handlebars.SafeString(new PrettyText(options).cook(text));
diff --git a/assets/javascripts/wizard/lib/user-search.js.es6 b/assets/javascripts/wizard/lib/user-search.js.es6
index eb832e04..8ef96266 100644
--- a/assets/javascripts/wizard/lib/user-search.js.es6
+++ b/assets/javascripts/wizard/lib/user-search.js.es6
@@ -2,7 +2,7 @@ import { CANCELLED_STATUS } from "discourse/lib/autocomplete";
import { debounce } from "@ember/runloop";
import getUrl from "discourse-common/lib/get-url";
-var cache = {},
+let cache = {},
cacheTopicId,
cacheTime,
currentTerm,
@@ -18,7 +18,7 @@ function performSearch(
group,
resultsFn
) {
- var cached = cache[term];
+ let cached = cache[term];
if (cached) {
resultsFn(cached);
return;
@@ -37,7 +37,7 @@ function performSearch(
},
});
- var returnVal = CANCELLED_STATUS;
+ let returnVal = CANCELLED_STATUS;
oldSearch
.then(function (r) {
@@ -59,7 +59,7 @@ function organizeResults(r, options) {
return r;
}
- var exclude = options.exclude || [],
+ let exclude = options.exclude || [],
limit = options.limit || 5,
users = [],
emails = [],
@@ -87,8 +87,9 @@ function organizeResults(r, options) {
if (
results.length > limit &&
options.term.toLowerCase() !== g.name.toLowerCase()
- )
+ ) {
return false;
+ }
if (exclude.indexOf(g.name) === -1) {
groups.push(g);
results.push(g);
@@ -104,7 +105,7 @@ function organizeResults(r, options) {
}
export default function userSearch(options) {
- var term = options.term || "",
+ let term = options.term || "",
includeGroups = options.includeGroups,
includeMentionableGroups = options.includeMentionableGroups,
includeMessageableGroups = options.includeMessageableGroups,
@@ -131,7 +132,7 @@ export default function userSearch(options) {
cacheTopicId = topicId;
- var clearPromise = setTimeout(function () {
+ let clearPromise = setTimeout(function () {
resolve(CANCELLED_STATUS);
}, 5000);
diff --git a/assets/javascripts/wizard/lib/wizard-i18n.js.es6 b/assets/javascripts/wizard/lib/wizard-i18n.js.es6
index 2b492338..17242e58 100644
--- a/assets/javascripts/wizard/lib/wizard-i18n.js.es6
+++ b/assets/javascripts/wizard/lib/wizard-i18n.js.es6
@@ -19,7 +19,9 @@ const translationExists = (key) => {
const WizardI18n = (key, params = {}) => {
const themeId = getThemeId();
- if (!themeId) return I18n.t(key, params);
+ if (!themeId) {
+ return I18n.t(key, params);
+ }
const themeKey = `theme_translations.${themeId}.${key}`;
diff --git a/assets/javascripts/wizard/models/custom.js.es6 b/assets/javascripts/wizard/models/custom.js.es6
index b2918ad7..4e214eed 100644
--- a/assets/javascripts/wizard/models/custom.js.es6
+++ b/assets/javascripts/wizard/models/custom.js.es6
@@ -10,7 +10,9 @@ const CustomWizard = EmberObject.extend({
totalSteps: (length) => length,
skip() {
- if (this.required && !this.completed && this.permitted) return;
+ if (this.required && !this.completed && this.permitted) {
+ return;
+ }
CustomWizard.skip(this.id);
},
});
@@ -35,7 +37,9 @@ export function findCustomWizard(wizardId, params = {}) {
let url = `/w/${wizardId}`;
let paramKeys = Object.keys(params).filter((k) => {
- if (k === "wizard_id") return false;
+ if (k === "wizard_id") {
+ return false;
+ }
return !!params[k];
});
@@ -51,7 +55,9 @@ export function findCustomWizard(wizardId, params = {}) {
return ajax({ url, cache: false, dataType: "json" }).then((result) => {
const wizard = result;
- if (!wizard) return null;
+ if (!wizard) {
+ return null;
+ }
if (!wizard.completed) {
wizard.steps = wizard.steps.map((step) => {
@@ -62,7 +68,7 @@ export function findCustomWizard(wizardId, params = {}) {
});
let tabindex = 1;
- stepObj.fields.forEach((f, i) => {
+ stepObj.fields.forEach((f) => {
f.tabindex = tabindex;
if (["date_time"].includes(f.type)) {
diff --git a/assets/javascripts/wizard/routes/custom-step.js.es6 b/assets/javascripts/wizard/routes/custom-step.js.es6
index 5fc15529..3cb5db6e 100644
--- a/assets/javascripts/wizard/routes/custom-step.js.es6
+++ b/assets/javascripts/wizard/routes/custom-step.js.es6
@@ -13,7 +13,9 @@ export default Ember.Route.extend({
},
afterModel(model) {
- if (model.completed) return this.transitionTo("index");
+ if (model.completed) {
+ return this.transitionTo("index");
+ }
return model.set("wizardId", this.modelFor("custom").id);
},
diff --git a/assets/javascripts/wizard/routes/custom.js.es6 b/assets/javascripts/wizard/routes/custom.js.es6
index e2e52ec7..041ea967 100644
--- a/assets/javascripts/wizard/routes/custom.js.es6
+++ b/assets/javascripts/wizard/routes/custom.js.es6
@@ -1,4 +1,4 @@
-/* eslint no-undef: 0 */
+/* eslint no-undef: 0*/
import { findCustomWizard } from "../models/custom";
import { ajax } from "wizard/lib/ajax";