The Console displays TypeError: Cannot read property 'replace' of undefined when the following search is performed in commons betalabs - https://commons.wikimedia.beta.wmflabs.org/wiki/Special:MediaSearch?type=bitmap&q=street&mimeType=jpeg
The error seems to refer to the following:
return this.imageinfo[0].thumburl.replace('/' + oldWidth + 'px-', '/' + newWidth + 'px-');
main: "resources/src/vue/index.js",
files: {
"resources/src/vue/index.js": function(require, module) {
(function() {
var Vue = require('../../lib/vue/vue.js');
Vue.use(require('./i18n.js'));
Vue.config.errorHandler = function(error) {
mw.errorLogger.logError(error, 'error.vue');
mw.log.error(error);
}
;
module.exports = Vue;
}());Notes:
- the error is present only in beta and only for the mentioned above search (I could not find any other search queries to reproduce the error).
- no impact on the user experience
Acceptance Criteria:
- Rewrite code to drop results if image thumbnail data is missing in both PHP and JS