Skip to content

Commit

Permalink
fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bero committed May 22, 2024
1 parent a06f7b2 commit c58f1f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion collection-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ CollectionHooks.extendCollectionInstance = function extendCollectionInstance (
Meteor.isClient || method === 'upsert' ? self : self._collection

// Store a reference to the original mutator method
const _super = collection[method]
// const _super = collection[method]

Meteor._ensure(self, 'direct', method)
self.direct[method] = function (...args) {
Expand Down Expand Up @@ -326,6 +326,7 @@ CollectionHooks.reassignPrototype = function reassignPrototype (
// Note: Assigning a prototype dynamically has performance implications
if (hasSetPrototypeOf) {
Object.setPrototypeOf(instance, constr.prototype)
// eslint-disable-next-line no-proto
} else if (instance.__proto__) {
// eslint-disable-line no-proto
instance.__proto__ = constr.prototype // eslint-disable-line no-proto
Expand Down
6 changes: 3 additions & 3 deletions tests/find_users.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor'
import { Tinytest } from 'meteor/tinytest'
import { InsecureLogin } from './insecure_login'
// import { Meteor } from 'meteor/meteor'
// import { Tinytest } from 'meteor/tinytest'
// import { InsecureLogin } from './insecure_login'

// NOTE: v3 not supporting find hooks
// TODO(v3): both not working on client. selector is just { test: 1 } instead of { test: 1, a: 1, b: 1 }
Expand Down
2 changes: 1 addition & 1 deletion tests/remove_allow.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (Meteor.isClient) {
// TODO(v3): allow-deny
await collection.removeAsync({ _id: id1 })
// just ignore the error
await collection.removeAsync({ _id: id2 }).catch((err) => {})
await collection.removeAsync({ _id: id2 }).catch(() => {})

test.equal(collection.find({ start_value: true }).count(), 1, 'only one document should remain')
next()
Expand Down

0 comments on commit c58f1f3

Please sign in to comment.