Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match is not defined #8

Closed
purplecones opened this issue Sep 9, 2016 · 6 comments
Closed

Match is not defined #8

purplecones opened this issue Sep 9, 2016 · 6 comments

Comments

@purplecones
Copy link

I get this error when calling softRemove() from the server.

ReferenceError: Match is not defined
at Class.softRemove (packages/jagi:astronomy-softremove-behavior/lib/class_prototype_methods/soft_remove.js:11:33)

I have the softremove package installed and attached it to my collection like so:

  behaviors: {
    softremove: {
      // The field name with a flag for marking a document as removed.
      removedFieldName: 'removed',
      // A flag indicating if a "removedAt" field should be present in a document.
      hasRemovedAtField: true,
      // The field name storing the removal date.
      removedAtFieldName: 'removedAt',
    },
  },
@purplecones
Copy link
Author

Here are the versions I have installed:

@lukejagodzinski
Copy link
Member

It looks like I forgot to include the check package at the top of the
file. I will fix that.

On Sep 9, 2016 10:37 PM, "Mirza Joldic" [email protected] wrote:

Here are the versions I have installed:

jagi:[email protected]
jagi:[email protected]
jagi:[email protected]
jagi:[email protected]


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#8 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABAKXV_4S9XqCGQsuRJV2d9MTQztKKdCks5qocOfgaJpZM4J5b_y
.

@Deadly0
Copy link

Deadly0 commented Aug 15, 2017

@jagi Please, fix it.
https://github.com/jagi/meteor-astronomy-softremove-behavior/blob/v2/lib/class_prototype_methods/soft_remove.js#L11
Match was not imported in this file, and when you try to call model.softRemove(param) with 1 param the error will be thrown

@lukejagodzinski
Copy link
Member

Can you create PR?

@davidsavoie1
Copy link

Hi! I cloned the repository to try and correct the Match reference issue, but I can't find in the files any use of Match. However, I still get an error in my code about that (ReferenceError: Match is not defined), even if I update the package to its latest version. What am I missing? 😕 I want to be helpful, but I don't yet grasp all the details!

The problem might be a non-issue in fact. I'm trying to wrap softRemove in a promise returning one, but I'm not even sure if it takes a callback function as remove does. Nothing is specified in the documentation about that... Does it?

@lukejagodzinski
Copy link
Member

@davidsavoie1 try updating to version 2.0.7. Should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants