mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
fix: make eventUtils throw if event type not registered (#6381)
* chore: update lint rules * fix: have eventUtils.get throw if event isn't found * chore: remove nonnull assertion from eventUtils.get and format
This commit is contained in:
committed by
GitHub
parent
980fe138e7
commit
60bc01acc8
@@ -187,9 +187,9 @@ export class FieldTextInput extends Field {
|
||||
// Revert value when the text becomes invalid.
|
||||
this.value_ = this.htmlInput_!.getAttribute('data-untyped-default-value');
|
||||
if (this.sourceBlock_ && eventUtils.isEnabled()) {
|
||||
eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_CHANGE))!
|
||||
(this.sourceBlock_, 'field', this.name || null,
|
||||
oldValue, this.value_));
|
||||
eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_CHANGE))(
|
||||
this.sourceBlock_, 'field', this.name || null, oldValue,
|
||||
this.value_));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user