mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-05 03:08:37 +00:00
866547d081
I run into this in some local test. There are two reasons this code can be reached: * When a wiki doesn't have the TemplateData extension, the additional API call from line #154 will fail. But the original search query succeeded. We have the `originalResponse` and can return it. This makes the code behave as if the additional TemplateData API call was never done. * But what if the original search query failed? We still end in line #183 – as we should. But this time it can't return anything but undefined. This will be considered a valid, successful API response. But it isn't. There might be a better way to clean up this chain of promises. This is the smallest fix I found. Change-Id: I02d3d053156da222ee424382007621f314777015 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
preinit | ||
tests | ||
themes | ||
ui |