/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict";
/** *Amiddlewarethatpreventsanyactionofbeingcalledonceitisactivated. *Thisisusefultoapplywhiledestroyingagivenpanel,asitwillignoreallcalls *toactions,whereweusuallymakeourclient->servercommunications. *Thismiddlewareshouldbedeclaredbeforeanyothermiddlewaretotoeffectively *ignoreeveryactions.
*/ function ignore({ getState }) { return next => action => { if (action.type === START_IGNORE_ACTION) {
getState()[IGNORING] = true; returnnull;
}
if (getState()[IGNORING]) { // Throw to stop execution from the callsite and prevent any further code from running thrownew Error( "[REDUX_MIDDLEWARE_IGNORED_REDUX_ACTION] Dispatching '" +
(action.type || action) + "' action after panel's closing"
);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.