Skip to content

Commit aa6e090

Browse files
committed
fix: fix type check
1 parent 4abcd36 commit aa6e090

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bridge/bindings/qjs/dom/element.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ JSValue Element::insertAdjacentElement(JSContext* ctx, JSValue this_val, int arg
166166
JSValue positionValue = argv[0];
167167
JSValue target = argv[1];
168168

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

0 commit comments

Comments
 (0)