From 146949ce43fe4ba5a862a6b3ffdd467bc48dec70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 9 May 2016 16:16:45 +0200 Subject: [PATCH] Fix fail in 1bc3f3b Assignment got lost, so caching did not work. Change-Id: If7f6df5b6c6d6156894803670263f34f2850a29a --- resources/js/ext.uls.compactlinks.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 9ab0df1f..e1e6c3af 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -323,9 +323,15 @@ /** * Get common languages - the most probable languages predicted by ULS. + * + * @param {Array} languages Array of all languages. */ getCommonLanguages: function ( languages ) { - return this.commonInterlanguageList || this.filterByCommonLanguages( languages ); + if ( this.commonInterlanguageList === null ) { + this.commonInterlanguageList = this.filterByCommonLanguages( languages ); + } + + return this.commonInterlanguageList; }, /**