Skip to content

Commit

Permalink
Merge pull request #371 from Meteor-Community-Packages/refactor/fix-i…
Browse files Browse the repository at this point in the history
…ndexing-functions-losing-context

fix for index creation functions losing context
  • Loading branch information
StorytellerCZ authored Jul 15, 2023
2 parents 15f8d58 + ec7206f commit e85dfe4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions roles/roles_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ let indexFnAssignment
let indexFnRoles

if (Meteor.roles.createIndexAsync) {
indexFnAssignment = Meteor.roleAssignment.createIndexAsync
indexFnRoles = Meteor.roles.createIndexAsync
indexFnAssignment = Meteor.roleAssignment.createIndexAsync.bind(Meteor.roleAssignment)
indexFnRoles = Meteor.roles.createIndexAsync.bind(Meteor.roles)
} else if (Meteor.roles.createIndex) {
indexFnAssignment = Meteor.roleAssignment.createIndex
indexFnRoles = Meteor.roles.createIndex
indexFnAssignment = Meteor.roleAssignment.createIndex.bind(Meteor.roleAssignment)
indexFnRoles = Meteor.roles.createIndex.bind(Meteor.roles)
} else {
indexFnAssignment = Meteor.roleAssignment._ensureIndex
indexFnRoles = Meteor.roles._ensureIndex
indexFnAssignment = Meteor.roleAssignment._ensureIndex.bind(Meteor.roleAssignment)
indexFnRoles = Meteor.roles._ensureIndex.bind(Meteor.roles)
}

[
Expand Down

0 comments on commit e85dfe4

Please sign in to comment.