Rename value state variable

Is more intuitive like that.

Change-Id: Ib36d6fa1bce9a564f5b9a1c027f2573a5775d2c5
This commit is contained in:
WMDE-Fisch 2022-08-05 10:07:14 +02:00
parent e422826a33
commit c66e700469

View file

@ -36,7 +36,7 @@ ve.ui.MWParameterPage = function VeUiMWParameterPage( parameter, config ) {
this.spec = parameter.getTemplate().getSpec();
this.defaultValue = parameter.getDefaultValue();
this.exampleValue = parameter.getExampleValue();
this.hadValue = null;
this.hasValue = null;
this.$info = $( '<div>' );
this.$field = $( '<div>' );
@ -302,9 +302,9 @@ ve.ui.MWParameterPage.prototype.onValueInputChange = function () {
this.edited = true;
this.parameter.setValue( value );
if ( !!value !== this.hadValue ) {
this.hadValue = !!value;
this.emit( 'hasValueChange', this.parameter.getId(), this.hadValue );
if ( !!value !== this.hasValue ) {
this.hasValue = !!value;
this.emit( 'hasValueChange', this.parameter.getId(), this.hasValue );
}
};