mirror of
https://github.com/motajs/template.git
synced 2026-11-10 12:47:01 +08:00
refactor: map
This commit is contained in:
1 parent
b262918082
commit
7c155be5ce
5 files changed
+27
-56
No files matched your search
@@ -41,16 +41,14 @@ export class StaticTile
|
||||
}
|
||||
|
||||
saveState(): Readonly<IStaticBlockSave> {
|
||||
let save: IStaticBlockSave;
|
||||
const eventView = this.tileEvent();
|
||||
if (eventView.dirty()) {
|
||||
save = {
|
||||
return {
|
||||
events: new Map(eventView.get())
|
||||
};
|
||||
} else {
|
||||
save = {};
|
||||
return {};
|
||||
}
|
||||
return save;
|
||||
}
|
||||
|
||||
loadState(save: Readonly<IStaticBlockSave>): void {
|
||||
|
||||
Reference in new issue
Block a user