MediaMath / strand

A collection of modular, reusable Web Components built upon Polymer
http://mediamath.github.io/strand/
BSD 3-Clause "New" or "Revised" License
119 stars 46 forks source link

Resolves an edge case where if target is set before attached an event… #125

Closed dlasky closed 7 years ago

dlasky commented 7 years ago

… listener could leak

@jcmoore @anthonykoerber

cc @chartnett

anthonykoerber commented 7 years ago

@dlasky looks like you removed _removeListener but we've still got _removeListener(oldTrigger) in there

I think line 31 should be:

if (oldTrigger) this.unlisten(this.toggleTrigger, 'tap', '_toggle');

yah?

dlasky commented 7 years ago

probably dont need the if anymore either actually since its gated, but the target should be somethign else

anthonykoerber commented 7 years ago

LGTM 👍

jcmoore commented 7 years ago

+1