Skip to content

Commit

Permalink
fix:react16
Browse files Browse the repository at this point in the history
  • Loading branch information
jawil committed Mar 1, 2019
1 parent 4f0a173 commit d9da3fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uxcore-message",
"version": "0.5.11",
"version": "0.5.12",
"description": "uxcore-message component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-message.git",
"author": "eternaslky",
Expand Down
4 changes: 3 additions & 1 deletion src/Message.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ function notice(content, duration = defaultDuration, type, onClose) {
const methods = {};

['info', 'success', 'error', 'loading', 'mask_loading', 'nw_loading'].forEach((item) => {
methods[item] = (content, duration, onClose) => notice(content, duration, item, onClose);
methods[item] = (content, duration, onClose) => setTimeout(() => {
notice(content, duration, item, onClose);
}, 0);
});

export default {
Expand Down

0 comments on commit d9da3fe

Please sign in to comment.