close
The Wayback Machine - https://web.archive.org/web/20201011192352/https://github.com/Meteor-Community-Packages/meteor-collection-hooks/issues/122
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

Meteor.users instanceof Mongo.Collection = false in IE < 10 or so #122

Open
rclai opened this issue May 22, 2015 · 3 comments
Open

Meteor.users instanceof Mongo.Collection = false in IE < 10 or so #122

rclai opened this issue May 22, 2015 · 3 comments

Comments

@rclai
Copy link
Contributor

@rclai rclai commented May 22, 2015

When you implemented replacing the prototype of Meteor.users, were you able to find a solution to get it to work for IE < 10? Or were you stuck (like I was)?

@matb33
Copy link
Collaborator

@matb33 matb33 commented May 30, 2015

I had a solution... I think... Perhaps it had to do with the presence of this file: https://github.com/matb33/meteor-collection-hooks/blob/v0.7.5/bind-polyfill.js which has since been removed

@comus
Copy link

@comus comus commented Sep 8, 2015

hi, recently i found my meteor-telescope app needs IE version >= 11 to run.
because telescope use collection-hooks.
and collection-hooks needs IE versions >= 11
and my meteor app crashed if i use IE<11.
it's __proto__ problem, i know.

I just want my meteor app not crash and then alert some message such as "please update your browser"

finally, i modified collection-hooks some source.

matb33:collection-hooks v0.7.13
users-compat.js
i added last 3 lines

if (Meteor.users) {
  // If Meteor.users has been instantiated, attempt to re-assign its prototype:
  CollectionHooks.reassignPrototype(Meteor.users);

  // Next, give it the hook aspects:
  var Collection = typeof Mongo !== "undefined" && typeof Mongo.Collection !== "undefined" ? Mongo.Collection : Meteor.Collection;
  CollectionHooks.extendCollectionInstance(Meteor.users, Collection);

  if( !(Meteor.users instanceof Mongo.Collection) && Meteor.isClient ) {
    Meteor.users = jQuery.extend(true, new Mongo.Collection(null), Meteor.users);
  }
}

it works, and telescope runs without errors, although the stylesheets crashed with old browser.
i dont know is it ok enough

@StorytellerCZ
Copy link
Member

@StorytellerCZ StorytellerCZ commented Oct 8, 2019

@comus Could you submit a PR for this if it is still and issue? Thank you!

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.