mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 11:46:55 +00:00
2527f931a2
Previous implementation did not pass the `result` variable to the catch() statement. Because of that every execution that ended with exception inside fetch() statement was threated as not a network exception and tried to present the null preview. Changes: - properly handle data returned by rejected fetch promise - chaged the big if (result && result....) into something easier to read - pass Error object instead of 'http' string - Restbase can return exception, it doesn't have to handle the 404 errors by itself, it's already taken care in the catch() logic - fixed unit tests to reflect new logic in restbase gateway Bug: T199482 Change-Id: Ibb30fc58248623d9ad4c5388a5b2ff9b387e01de |
||
---|---|---|
.. | ||
dist | ||
ext.popups | ||
ext.popups.images |