WIP: use deepCopy

This commit is contained in:
eight 2018-10-06 03:19:51 +08:00
parent bb1cb58024
commit 3a618aca2a

View File

@ -1,4 +1,4 @@
/* global promisify */
/* global promisify deepCopy */
'use strict';
const msg = (() => {
@ -174,7 +174,9 @@ const msg = (() => {
return preparing.then(() => exchangeGet(message, keepStorage));
}
message.data = bg._msg.storage.get(message.id);
if (!keepStorage) {
if (keepStorage) {
message.data = deepCopy(data);
} else {
bg._msg.storage.delete(message.id);
}
}