Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'Message' of undefined #125

Open
vinjex opened this issue Jul 17, 2017 · 0 comments
Open

Cannot read property 'Message' of undefined #125

vinjex opened this issue Jul 17, 2017 · 0 comments

Comments

@vinjex
Copy link

vinjex commented Jul 17, 2017

at messenger-theme-flat.js:27
})(window.Messenger.Message);
and at messenger-theme-flat.js:33
}).call(this);
I never changed the files so I don't understand what's causing this problem.
This error causes Messenger to not use the theme and options and to show on top of the page
This is how I post the notifications:

Messenger().post({
                    message: 'There was an explosion while processing your request.',
                    type: 'error',
                    showCloseButton: true
                });

using options:

Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom',
            theme: 'flat'
        }

messenger-theme-flat.js:

(function() {
  var $, FlatMessage, spinner_template,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  $ = jQuery;

  spinner_template = '<div class="messenger-spinner">\n    <span class="messenger-spinner-side messenger-spinner-side-left">\n        <span class="messenger-spinner-fill"></span>\n    </span>\n    <span class="messenger-spinner-side messenger-spinner-side-right">\n        <span class="messenger-spinner-fill"></span>\n    </span>\n</div>';

  FlatMessage = (function(_super) {

    __extends(FlatMessage, _super);

    function FlatMessage() {
      return FlatMessage.__super__.constructor.apply(this, arguments);
    }

    FlatMessage.prototype.template = function(opts) {
      var $message;
      $message = FlatMessage.__super__.template.apply(this, arguments);
      $message.append($(spinner_template));
      return $message;
    };

    return FlatMessage;

  })(window.Messenger.Message);

  window.Messenger.themes.flat = {
    Message: FlatMessage
  };

}).call(this);

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant