From 02654c0086939d4b63594f8b4700e0299bc7c4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 14 Nov 2024 22:30:05 +0100 Subject: [PATCH] Fix forwarding promise rejection arguments Follow-up to arrow functions refactoring (4db99d7a2730e0393be9003ac4915ba711ef9a69). Change-Id: I6ea41256d9a91552736742100630aab333375125 --- modules/ve-mw/preinit/ve.init.mw.DiffLoader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ve-mw/preinit/ve.init.mw.DiffLoader.js b/modules/ve-mw/preinit/ve.init.mw.DiffLoader.js index d1e59e52c1..d04e9ba93c 100644 --- a/modules/ve-mw/preinit/ve.init.mw.DiffLoader.js +++ b/modules/ve-mw/preinit/ve.init.mw.DiffLoader.js @@ -64,11 +64,11 @@ true ).then( ( response ) => parseDocumentModulePromise.then( () => mw.libs.ve.diffLoader.getModelFromResponse( response, section ) ), - () => { - // Clear promise. Do not cache errors. + ( ...args ) => { + // Clear promise. Do not cache errors. delete revCache[ cacheKey ]; // Let caller handle the error code - return $.Deferred().rejectWith( this, arguments ); + return $.Deferred().reject( ...args ); } );