mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 16:14:01 +08:00
fix(metadata): Saving on non-existent models should not throw
This commit is contained in:
parent
e313da8a6b
commit
1b04cc17da
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class MetadataStore extends NylasStore {
|
|||
return (
|
||||
t.modelify(modelClass, _.pluck(models, 'clientId'))
|
||||
.then((latestModels)=> {
|
||||
const updatedModels = latestModels.map(m => m.applyPluginMetadata(pluginId, metadataValue));
|
||||
const updatedModels = _.compact(latestModels).map(m => m.applyPluginMetadata(pluginId, metadataValue));
|
||||
return (
|
||||
t.persistModels(updatedModels)
|
||||
.then(()=> Promise.resolve(updatedModels))
|
||||
|
|
Loading…
Reference in a new issue