mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-28 01:10:04 +00:00
Don't leak deferreds out of functions
Always try to return a promise. Bug: T170807 Change-Id: I4a48b6e40a5398a743e39589b5c2fcac4482a814
This commit is contained in:
parent
95b880aa29
commit
2df22ef2b2
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.json
vendored
BIN
resources/dist/index.js.json
vendored
Binary file not shown.
|
@ -205,7 +205,7 @@ export function linkDwell( title, el, event, gateway, generateToken ) {
|
|||
dispatch( action );
|
||||
|
||||
if ( !isNewInteraction() ) {
|
||||
return $.Deferred().resolve();
|
||||
return $.Deferred().resolve().promise();
|
||||
}
|
||||
|
||||
return wait( FETCH_START_DELAY )
|
||||
|
@ -232,7 +232,7 @@ export function abandon() {
|
|||
var token = getState().preview.activeToken;
|
||||
|
||||
if ( !token ) {
|
||||
return $.Deferred().resolve();
|
||||
return $.Deferred().resolve().promise();
|
||||
}
|
||||
|
||||
dispatch( timedAction( {
|
||||
|
|
Loading…
Reference in a new issue