File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ function isDeepSync (method, engine) {
114
114
if ( Array . isArray ( method ) ) return method . every ( i => isDeepSync ( i , engine ) )
115
115
116
116
if ( method && typeof method === 'object' ) {
117
- const func = Object . keys ( method ) [ 0 ]
117
+ const keys = Object . keys ( method )
118
+ if ( keys . length === 0 ) return true
119
+ const func = keys [ 0 ]
118
120
119
121
const lower = method [ func ]
120
122
if ( ! isSync ( engine . methods [ func ] ) ) return false
Original file line number Diff line number Diff line change 182
182
"rule" : { "+" : [[1 ]] },
183
183
"result" : { "error" : " NaN" },
184
184
"data" : null
185
+ },
186
+ {
187
+ "description" : " Plus Operator with Single Operand, Object Input Produces NaN" ,
188
+ "rule" : { "+" : [{}] },
189
+ "result" : { "error" : " NaN" },
190
+ "data" : null
191
+ },
192
+ {
193
+ "description" : " Plus Operator with Single Operand, Direct Object Input Produces NaN" ,
194
+ "rule" : { "+" : {} },
195
+ "result" : { "error" : " NaN" },
196
+ "data" : null
185
197
}
186
198
]
You can’t perform that action at this time.
0 commit comments