mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
fix: move deprecation warning to correct fromJson (#6831)
Resolves #6830. https://groups.google.com/g/blockly/c/uy_8e7Q8XEw/m/8XveAYi3AQAJ
This commit is contained in:
@@ -73,6 +73,9 @@ export abstract class Abstract {
|
||||
* @param json JSON representation.
|
||||
*/
|
||||
fromJson(json: AbstractEventJson) {
|
||||
deprecation.warn(
|
||||
'Blockly.Events.Abstract.prototype.fromJson', 'version 9', 'version 10',
|
||||
'Blockly.Events.fromJson');
|
||||
this.isBlank = false;
|
||||
this.group = json['group'] || '';
|
||||
}
|
||||
@@ -88,9 +91,6 @@ export abstract class Abstract {
|
||||
*/
|
||||
static fromJson(json: AbstractEventJson, workspace: Workspace, event: any):
|
||||
Abstract {
|
||||
deprecation.warn(
|
||||
'Blockly.Events.Abstract.prototype.fromJson', 'version 9', 'version 10',
|
||||
'Blockly.Events.fromJson');
|
||||
event.isBlank = false;
|
||||
event.group = json['group'] || '';
|
||||
event.workspaceId = workspace.id;
|
||||
|
||||
Reference in New Issue
Block a user