meteor-space / ui

Pattern-agnostic base UI package to gain control over your Meteor UI
MIT License
121 stars 15 forks source link

Error on startup: Cannot read property 'constructor' of undefined #26

Closed npvn closed 9 years ago

npvn commented 9 years ago

I'm refactoring an existing app to use space-ui.

This error happens on client startup. My browser console points to line 56 of space:messaging/source/controller.coffee:

  @_isEvent: (message) ->
    message.__super__.constructor is Space.messaging.Event

I've been investigating for a long time without any clue :pensive:

Here is the refactored app: https://bitbucket.org/npvn/meteor-url-shortener/commits/branch/space-ui

Any help is greatly appreciated!

DominikGuzei commented 9 years ago

Hey @npvn! This error indicates that you try to publish something on the Space.messaging.EventBus that is not extending the Space.messaging.Event class. Currently you can only publish events, but the next version of space:messaging will be more flexible. I already have it on my computer and will push it today!

npvn commented 9 years ago

@DominikGuzei: Thanks for the quick reply!

You gave me a clue that eventually led me to discovering the bug: It's a syntax error :satisfied:

Thanks again!

DominikGuzei commented 9 years ago

You are welcome! :wink: