Skip to content

Commit

Permalink
TIL that includes() is also not supported in all browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Mar 24, 2021
1 parent f231d7b commit 4e74ea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1637,10 +1637,10 @@ function _ensureIndexes(model, options, callback) {
const results = Object.keys(indexFields).map(function(key) {
return indexFields[key];
});
if (!results.includes('text')) {
return true;
if (results.indexOf('text') !== -1) {
return false;
}
return false;
return true;
};
delete indexOptions._autoIndex;
_decorateDiscriminatorIndexOptions(model, indexOptions);
Expand Down

0 comments on commit 4e74ea7

Please sign in to comment.