postaljs / postal.js

JavaScript pub/sub library supporting advanced subscription features, and several helpful add-ons.

Home Page:http://ifandelse.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resubscribing throwing error

arashb31 opened this issue · comments

commented

I'm using postal.js and sometimes when I subscribe to a channel, I receive an error that looks like this:

For example, if I do something like

postal.channel().subscribe('homefeed', alert)

I get

"Cannot read property '/|homefeed' of undefined"

Stack trace below:
at http://localhost:8080/libs/postal.js:8:730 at http://localhost:8080/libs/postal.js:8:7297 at u (http://localhost:8080/libs/lodash.min.js:6:412) at Function.se (http://localhost:8080/libs/lodash.min.js:52:212) at Object.e.extend.subscribe (http://localhost:8080/libs/postal.js:8:7187) at p.subscribe (http://localhost:8080/libs/postal.js:8:1471)

This seem to happen when I subscribe, and then unsubscribe, and then re-subscribe to the same topic.

@arashb31 I apologize for the delay in responding. I've not been able to reproduce the issue. Do you have a gist, jsfiddle or something that consistently shows this happening? Also - what version of postal and lodash were you using?