Skip to content

Commit 30e6c36

Browse files
fix(eslint-plugin): fix bug in no-localhost-reference rule
1 parent f75a2a2 commit 30e6c36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/eslint-plugin/rules/portal/lib/rules/no-localhost-reference.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module.exports = {
2525
if (
2626
node &&
2727
node.value &&
28-
typeof node.value.includes === 'function' &&
29-
node.value.includes('localhost')
28+
typeof node.value === 'string' &&
29+
node.value.indexOf('localhost') !== -1
3030
) {
3131
context.report({
3232
message: DESCRIPTION,

0 commit comments

Comments
 (0)