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) {
114114 if ( Array . isArray ( method ) ) return method . every ( i => isDeepSync ( i , engine ) )
115115
116116 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 ]
118120
119121 const lower = method [ func ]
120122 if ( ! isSync ( engine . methods [ func ] ) ) return false
Original file line number Diff line number Diff line change 182182 "rule" : { "+" : [[1 ]] },
183183 "result" : { "error" : " NaN" },
184184 "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
185197 }
186198]
You can’t perform that action at this time.
0 commit comments