angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

$AnimateProvider "enter" method bug

Open jirikuchta opened this issue 12 years ago • 3 comments

The "enter" method in $AnimateProvider throws an error if no "after" parameter is passed and "parent" parameter is an empty element.

Here is what the method looks like:

function(element, parent, after, done) {
   if (after) {
      after.after(element);
   } else {
      if (!parent || !parent[0]) {
         parent = after.parent();
      }
      parent.append(element);
   }
   async(done);
}

The inner condition throws an error because "after" element is never defined (it is eliminated by the preceding condition).

I am not sure what the right behavior should be so I don't propose any fix.

jirikuchta avatar Jul 31 '14 19:07 jirikuchta

Can you provide a scenario where you call enter in this way so that we can ascertain what the best fix should be? A working Plunker would be ideal.

petebacondarwin avatar Jul 31 '14 20:07 petebacondarwin

This sounds suspiciously like #6275 --- but matias fixed that one

caitp avatar Aug 01 '14 14:08 caitp

Yep, it seems I did a bad work when searching through existing issues.

jirikuchta avatar Aug 01 '14 14:08 jirikuchta