Recognize 'yes' as boolean true whem matching variable types
This commit is contained in:
1 parent
46119e1377
commit
ece1289ff8
1 file changed
+1
-1
+1
-1
@@ -54,7 +54,7 @@ exports.matchType = (src, dst) ->
|
|||||||
Number(dst)
|
Number(dst)
|
||||||
when BOOLEAN_TYPE
|
when BOOLEAN_TYPE
|
||||||
v = String(dst).trim().toLowerCase()
|
v = String(dst).trim().toLowerCase()
|
||||||
v == 'true' or v == 'on' or v == '1'
|
v == 'true' or v == 'on' or v == 'yes' or v == '1'
|
||||||
else
|
else
|
||||||
dst
|
dst
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user