idmillington / undum

A client-side framework for narrative hypertext interactive fiction.
https://idmillington.github.com/undum
MIT License
336 stars 80 forks source link

Fix bad reference to this (for real) #45

Closed eykd closed 8 years ago

eykd commented 8 years ago

So, my previous fix was misunderstanding the situation. Inside a filter() lambda, this is bound to the current DOM object. In order to call attr() on it, we first need to wrap it in a jQuery object. This PR corrects my earlier mistake. Sorry about that!

idmillington commented 8 years ago

It's a good example of why we could do with unittests. The change you made first was such a common fix that I assumed I'd made that bug (I've done that plenty of times before), but I didn't check your fix. Thanks for the follow up fix!