Closed pgrever closed 1 year ago
This is an error from the handlebars-helpers library:
I guess this error is thrown because there is now a strict type-check somewhere.
The reason for the error is that pageCount
is undefined inside your for
-helper.
You have to make variables available in your helper like this:
Just to clarify... This was working without error in 4.5.3. But as of 4.6.0 it does not. The release notes indicate that there were not any breaking changes between these versions (hence only a minor version roll). However, this appears to be a breaking change to me. Am I missing something, or should this still behave the same?
FYI, I have verified that in 4.5.3 pageCount was available with the the for
helper. Is there some reason that data properties are no longer available inside the helpers? This definitely seems like a breaking change.
Just to clarify... This was working without error in 4.5.3. But as of 4.6.0 it does not. The release notes indicate that there were not any breaking changes between these versions (hence only a minor version roll). However, this appears to be a breaking change to me. Am I missing something, or should this still behave the same?
There was a breaking change (for security reasons):
OK, thank you. Based upon terminology I did not realize that our use case was the same as the one mentioned in the release notes.
Before filing issues, please check the following points first:
The following code worked in 4.5.3. When I tried to update to the latest it is failing with the error "TypeError: expected the first argument to be a number". It appears that this started failing in 4.6.0.
Version of handlebars-helpers is 0.10.0