Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -85,24 +85,23 @@ var toaster = _extends(function (content, options) {
return false;
},
update: function update(id, options) {
if (container && typeof container.collection[id] !== 'undefined') {
var _container$collection = container.collection[id],
oldOptions = _container$collection.options,
oldContent = _container$collection.content;
setTimeout(function () {
if (container && typeof container.collection[id] !== 'undefined') {
var _container$collection = container.collection[id],
oldOptions = _container$collection.options,
oldContent = _container$collection.content;
var updateId = oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
var updateId = oldOptions.updateId !== null ? oldOptions.updateId + 1 : 1;
var nextOptions = _extends({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
var content = typeof nextOptions.render !== 'undefined' ? nextOptions.render : oldContent;
delete nextOptions.render;
return emitEvent(content, nextOptions);
}
return false;
var nextOptions = _extends({}, oldOptions, options, {
toastId: id,
updateId: updateId
});
var content = typeof nextOptions.render !== 'undefined' ? nextOptions.render : oldContent;
delete nextOptions.render;
emitEvent(content, nextOptions);
}
}, 0);
}
}, {
POSITION: _constant.POSITION,