fix: for tag not respecting Drop#valueOf(), fixes #515

This commit is contained in:
Harttle
2022-07-09 22:21:51 +08:00
parent a19feea7c4
commit c3e51caa70
6 changed files with 15 additions and 18 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export function stringify (value: any): string {
}
export function toValue (value: any): any {
return value instanceof Drop ? value.valueOf() : value
return (value instanceof Drop && isFunction(value.valueOf)) ? value.valueOf() : value
}
export function isNumber (value: any): value is number {