Ver Fonte

Return if no previousSibling of el found

Cater for scenario where there is no previous sibling of el. Solution to #1249 and similar to #982. Occurs in scenario where dragging between lists using a library such as RubaXa Sortable.
weislanes há 10 anos atrás
pai
commit
bc4ef8db81
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      src/directives/public/for.js

+ 1 - 0
src/directives/public/for.js

@@ -539,6 +539,7 @@ function findPrevFrag (frag, anchor, id) {
     el !== anchor
   ) {
     el = el.previousSibling
+    if (!el) return
     frag = el.__vfrag__
   }
   return frag