Completely updated React, fixed #11, (hopefully)
This commit is contained in:
31
goTorrentWebUI/node_modules/react-toastify/lib/toaster.js
generated
vendored
31
goTorrentWebUI/node_modules/react-toastify/lib/toaster.js
generated
vendored
@@ -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,
|
||||
|
Reference in New Issue
Block a user