meteor-pages icon indicating copy to clipboard operation
meteor-pages copied to clipboard

Error in newly added line.

Open abhishekbatra opened this issue 9 years ago • 2 comments

Hi,

This line was recently added in the commit b3b105a9677bd0ea3988f2ffd30328078b9e9927 results in error:

Uncaught TypeError: Cannot read property 'onRendered' of undefined

in case templateName is not defined while creating the Pagination object. I discovered this, while writing a fix for #96 which I need myself. Hope you fix this soon and I'll send a PR for #96

Thanks, Abhishek

abhishekbatra avatar May 11 '15 03:05 abhishekbatra

Also got this same error on master, but not on 1.8.4

JonDum avatar Jun 27 '15 20:06 JonDum

if @templateName isnt undefined
  Template[@templateName].onRendered =>
    @setInfiniteTrigger() if @infinite

I modified the code like above, and it works !

sieutruc avatar Jul 31 '15 16:07 sieutruc