mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 18:47:51 +08:00
[client-sync] 🎨 Remove unecessary use of PromiseUtils
Given that this packages lives inside the NylasMail app, it has access to Bluebird Promises, which already define a .each method. Using PromiseUtils here is unecessary
This commit is contained in:
parent
b96300f000
commit
dced0aa99e
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
const Sequelize = require('sequelize');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const {loadModels, PromiseUtils, HookIncrementVersionOnSave, HookTransactionLog} = require('isomorphic-core');
|
||||
const {loadModels, HookIncrementVersionOnSave, HookTransactionLog} = require('isomorphic-core');
|
||||
const TransactionConnector = require('./transaction-connector')
|
||||
|
||||
require('./database-extensions'); // Extends Sequelize on require
|
||||
|
@ -58,7 +58,7 @@ class LocalDatabaseConnector {
|
|||
// this is a bit of a hack, because sequelize.sync() doesn't work with
|
||||
// schemas. It's necessary to sync models individually and in the right order.
|
||||
const models = ['Contact', 'Folder', 'Label', 'Transaction', 'Thread', 'ThreadLabel', 'ThreadFolder', 'Message', 'MessageLabel', 'Reference', 'MessageReference', 'File', 'SyncbackRequest'];
|
||||
return PromiseUtils.each(models, (n) =>
|
||||
return Promise.each(models, (n) =>
|
||||
db[n].sync()
|
||||
)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue