Skip to content

Commit

Permalink
fix: fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Apr 30, 2022
1 parent 4abcd36 commit aa6e090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridge/bindings/qjs/dom/element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ JSValue Element::insertAdjacentElement(JSContext* ctx, JSValue this_val, int arg
JSValue positionValue = argv[0];
JSValue target = argv[1];

if (!JS_IsNull(target)) {
if (!JS_IsObject(target)) {
return JS_ThrowTypeError(ctx, "TypeError: Failed to execute 'insertAdjacentElement' on 'Element': parameter 2 is not of type 'Element'");
}

Expand Down

0 comments on commit aa6e090

Please sign in to comment.