Merge "Avoid (safe) exception by using empty options"

This commit is contained in:
jenkins-bot
2015-07-17 20:10:36 +00:00
committed by Gerrit Code Review

View File

@@ -101,7 +101,9 @@
this.preferences = preferenceStore().get( this.preferenceName );
} else {
var options = mw.user.options.get( this.preferenceName );
if ( !options ) {
options = '{}';
}
// Try to parse JSON
try {
this.preferences = JSON.parse( options );