فهرست منبع

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

daiwei 5 ماه پیش
والد
کامیت
c1038582b4
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  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))()