Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Add doesn't work after reset #9

Open
jozsi opened this issue Aug 12, 2014 · 2 comments
Open

Add doesn't work after reset #9

jozsi opened this issue Aug 12, 2014 · 2 comments

Comments

@jozsi
Copy link

jozsi commented Aug 12, 2014

The following, self-explanatory code results in an empty mcMessages array (no message displayed).

messageCenterService.reset();
messageCenterService.add('danger', 'This is dangerous');

A workaround for this is to use:

messageCenterService.markShown();
messageCenterService.removeShown();
messageCenterService.add('danger', 'This is dangerous');
@kikonen-fiksu
Copy link

It looks like reset is broken.

With this change reset started to work better for me

reset: function () {
  this.mcMessages.splice(0, this.mcMessages.length);
},

@simison
Copy link
Contributor

simison commented Sep 18, 2015

@kikonen-fiksu or @jozsi PR please?

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

No branches or pull requests

3 participants