Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

_.template now returns a function #210

Open
tswaters opened this issue Jan 19, 2015 · 0 comments
Open

_.template now returns a function #210

tswaters opened this issue Jan 19, 2015 · 0 comments

Comments

@tswaters
Copy link

I've installed bower components and referenced them all... when starting it up I get an error raised in jQuery, "a is null".

I've tracked it down to the following, line:

_getMinimized: function () {
return jQuery(_.template(this.options.templates.minimized, {}));
},
:

_getMinimized: function () {
  return jQuery(_.template(this.options.templates.minimized, {}));
},

(although, doing a search for _.template in the project, it seems this is the only one to actually fail -- I imagine there are quite a few others that should be fixed as well)

_.template started returning a function in 1.7.0 I believe.... and when passing the function to jQuery it fails.. Looking at the reference the bower.json, it references >= 1.2.0 which may not be entirely safe.

I've updated to lodash in my own project, the one with underscore compatibility, and it seems to work pretty well.

@tswaters tswaters changed the title jquery error, context is null _.template now returns a function Jan 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant