Skip to content

Commit 7f3ed66

Browse files
committed
Fix payload checking
1 parent e1ec2a0 commit 7f3ed66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = (RED) => {
128128
return;
129129
}
130130

131-
const isAnObject = (value) => (value && typeof value === 'object' && (value.__proto__ == null || value.__proto__ === Object.prototype));
131+
const isAnObject = value => value === Object(value) && !Array.isArray(value);
132132
if (msg.payload !== undefined && !isAnObject(msg.payload)) {
133133
this.error('msg.payload should be an object containing the query arguments.');
134134
return;

0 commit comments

Comments
 (0)