mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-11 13:01:18 -04:00
Don't serialize or load monitor values
This commit is contained in:
parent
d01f04bd3e
commit
08a1267a41
1 changed files with 5 additions and 1 deletions
|
@ -500,7 +500,6 @@ const serializeMonitors = function (monitors) {
|
|||
opcode: monitorData.opcode,
|
||||
params: monitorData.params,
|
||||
spriteName: monitorData.spriteName,
|
||||
value: monitorData.value,
|
||||
width: monitorData.width,
|
||||
height: monitorData.height,
|
||||
x: monitorData.x,
|
||||
|
@ -1189,6 +1188,11 @@ const deserializeMonitor = function (monitorData, runtime, targets, extensions)
|
|||
}
|
||||
}
|
||||
|
||||
// Don't load potentially stale monitor data
|
||||
// e.g. loudness, answer, timer, and other blocks which depend on global or external state,
|
||||
// as well as values which were updated whilst the monitor was hidden
|
||||
monitorData.value = null;
|
||||
|
||||
runtime.requestAddMonitor(MonitorRecord(monitorData));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue