fix(unpersistModel) Add default value for opts param

Just an empty object, so looking up a property on it doesn't error.
(Also some whitespace changes that automatically changed on save.)
This commit is contained in:
Halla Moore 2017-01-24 16:45:49 -08:00
parent 5ed1f4da9e
commit d3a0d60f0d

View file

@ -812,7 +812,7 @@ class DatabaseStore extends NylasStore {
// opts can have a boolean isBeingUnpersisted value, which when true prevents
// this function from re-persisting the model.
unindexModel(model, opts) {
unindexModel(model, opts = {}) {
const searchTableName = `${model.constructor.name}Search`;
const sql = (
`DELETE FROM \`${searchTableName}\` WHERE \`${searchTableName}\`.\`content_id\` = ?`