fix: comparison for empty/nil, fixes #321

This commit is contained in:
Jun Yang
2021-03-13 17:14:08 +08:00
parent aff9976042
commit 99d14e76d7
6 changed files with 36 additions and 11 deletions
+1 -2
View File
@@ -1,11 +1,10 @@
import { Drop } from './drop'
import { Comparable } from './comparable'
import { isNil, toValue } from '../util/underscore'
import { BlankDrop } from '../drop/blank-drop'
export class NullDrop extends Drop implements Comparable {
public equals (value: any) {
return isNil(toValue(value)) || value instanceof BlankDrop
return isNil(toValue(value))
}
public gt () {
return false