Avoid a js error when inputsettings are saved.
It happens when input settings are accessed directly while display settings are not initialized. While saving the display settings will not be rendered, causing a js error Change-Id: I3ef1afe67a6bcdc3047b482d697bc03baab6ac47
This commit is contained in:
committed by
Amire80
parent
7e787c0fc5
commit
9dd4072d3d
@@ -88,6 +88,7 @@
|
|||||||
this.contentLanguage = this.getContentLanguage();
|
this.contentLanguage = this.getContentLanguage();
|
||||||
this.$webfonts = null;
|
this.$webfonts = null;
|
||||||
this.$parent = $parent;
|
this.$parent = $parent;
|
||||||
|
this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences );
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplaySettings.prototype = {
|
DisplaySettings.prototype = {
|
||||||
@@ -111,7 +112,6 @@
|
|||||||
this.preview( this.uiLanguage );
|
this.preview( this.uiLanguage );
|
||||||
this.listen();
|
this.listen();
|
||||||
this.dirty = false;
|
this.dirty = false;
|
||||||
this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences );
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -555,7 +555,7 @@
|
|||||||
*/
|
*/
|
||||||
onSave: function ( success ) {
|
onSave: function ( success ) {
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
if ( this.$webfonts !== undefined ) {
|
if ( this.$webfonts ) {
|
||||||
// Live font update
|
// Live font update
|
||||||
this.$webfonts.refresh();
|
this.$webfonts.refresh();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user