Skip to content

Commit 252e8c6

Browse files
authored
Merge pull request #1376 from jdufresne/js-includes
Prefer String.includes() over String.indexOf()
2 parents 062a933 + e37e744 commit 252e8c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const djdt = {
240240
},
241241
cookie: {
242242
get: function (key) {
243-
if (document.cookie.indexOf(key) === -1) {
243+
if (!document.cookie.includes(key)) {
244244
return null;
245245
}
246246

0 commit comments

Comments
 (0)