Skip to content

Commit 54ffcc6

Browse files
committed
Returns input value of number or string.
1 parent 71e1206 commit 54ffcc6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

v3/src/utils/object/GetFastValue.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
var GetFastValue = function (source, key, defaultValue)
66
{
7-
if (!source || typeof source === 'number')
7+
var t = typeof(source);
8+
9+
if (!source || t === 'number' || t === 'string')
810
{
911
return defaultValue;
1012
}

0 commit comments

Comments
 (0)