Make sure script execution doesn't stop by assuming unchecked input is set
These methods aren't designed to return "undefined" or "null". What they return is not checked. It's assumed to always be an object (2 of them) or an array (1 of them). This simple patch does make sure the following code does not fail with TypeErrors. Bug: 55701 Change-Id: I19f51bbff2209044485b9d7cef4c7654cb5f6425
This commit is contained in:
committed by
Thiemo Mättig (WMDE)
parent
0fd434c87a
commit
5fab7bd738
@@ -140,7 +140,7 @@
|
||||
};
|
||||
|
||||
mw.uls.getAcceptLanguageList = function () {
|
||||
return mw.config.get( 'wgULSAcceptLanguageList' );
|
||||
return mw.config.get( 'wgULSAcceptLanguageList' ) || [];
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user