Skip to content

Commit 81b5f2a

Browse files
authored
Merge pull request #6984 from himdel/fix-treeselect
remove-generic-item-modal: fix typeof==undefined bug
2 parents 7754e37 + 8bcd19c commit 81b5f2a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@
6565
"no-unreachable": 2,
6666
"use-isnan": 2,
6767
"valid-jsdoc": 2,
68-
"valid-typeof": 2,
68+
"valid-typeof": [2, {
69+
"requireStringLiterals": true
70+
}],
6971
"dot-notation": [2, {
7072
"allowKeywords": true
7173
}],

app/javascript/.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
"react/jsx-filename-extension": "off",
5656
"react/destructuring-assignment": [1, "always"],
5757
"semi": [2, "always"],
58-
"space-before-function-paren": [2, "never"]
58+
"space-before-function-paren": [2, "never"],
59+
"valid-typeof": [2, {
60+
"requireStringLiterals": true
61+
}]
5962
}
6063
}

app/javascript/components/remove-generic-item-modal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const removeItems = (items, apiUrl, asyncDelete, redirectUrl, treeSelect)
4343
})
4444
.then((apiData) => {
4545
if (items.length > 1 || (items.length === 1 && apiData[0].result === 'success')) {
46-
if (typeof(treeSelect) == undefined) {
46+
if (!treeSelect) {
4747
window.location.href = redirectUrl;
4848
miqSparkleOff();
4949
} else {

0 commit comments

Comments
 (0)