Przeglądaj źródła

fix(runtime-dom): simplify moveNode feature detection logic

daiwei 3 miesięcy temu
rodzic
commit
c1038582b4
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      packages/runtime-dom/src/nodeOps.ts

+ 1 - 2
packages/runtime-dom/src/nodeOps.ts

@@ -54,8 +54,7 @@ export const moveNode: (
   anchor: Node | null,
 ) => void =
   /*@__PURE__*/ (() =>
-    (__TEST__ ? typeof HTMLElement !== 'undefined' : true) &&
-    'moveBefore' in HTMLElement.prototype
+    typeof HTMLElement !== 'undefined' && 'moveBefore' in HTMLElement.prototype
       ? (parent, child, anchor) => parent.moveBefore!(child, anchor)
       : (parent, child, anchor) => parent.insertBefore(child, anchor))()