Skip to content

Commit bc52a10

Browse files
committed
corrected the behavior of 'endsWith'
1 parent 9399752 commit bc52a10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @param suffix the suffix to check.
66
* @return {boolean}
77
*/
8-
const endsWith = (str, suffix) => str.indexOf(suffix, str.length - suffix.length) === 0;
8+
const endsWith = (str, suffix) => str.indexOf(suffix, str.length - suffix.length) >= 0;
99

1010
/**
1111
* Normalizes the given keyPrefix to a defined format.

0 commit comments

Comments
 (0)