mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-07 16:48:02 +08:00
fix(metadata): Saving on non-existent models should not throw
This commit is contained in:
parent
24939caa78
commit
080ff933f2
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