Skip to content

Commit f83f63f

Browse files
authored
fix: GetValue not checking for the existence of '.' correctly
indexOf returns -1 when the passed string is not found, which is truthy.
1 parent 2882208 commit f83f63f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/object/GetValue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var GetValue = function (source, key, defaultValue)
3030
{
3131
return source[key];
3232
}
33-
else if (key.indexOf('.'))
33+
else if (key.indexOf('.') !== -1)
3434
{
3535
var keys = key.split('.');
3636
var parent = source;

0 commit comments

Comments
 (0)