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

[Bug Report]: add() formatter not working with arrays. Issue replicated with excel template and data provided by Carbone #165

Open
menbatisiunissart opened this issue Jun 27, 2022 · 0 comments
Labels
T: bug Functionality that does not work as intended/expected

Comments

@menbatisiunissart
Copy link

menbatisiunissart commented Jun 27, 2022

Environment
Carbone Version: 3.2.3 (also tested with 2.1.1 with similar results)
Node Version: v16.13.0
Desktop OS: Mac Os 11.6.7 Big Sur

Expected Behaviour
Excel "dynamic paramters" example provided by carbone.id:
https://carbone.io/examples/dynamic-parameters/Archive.zip

  • Render content of {d.obj.arr[0].value:add(..arr[1].total)} as correct value (25)
  • Render content of {d.obj.arr[0].value:add(d.obj.arr[1].total)} as correct value (25)

Actual Behaviour
Content rendered as NaN

Steps to reproduce
Steps to reproduce the bug:

  1. Go to https://carbone.io/examples/dynamic-parameters/Archive.zip
  2. Run the template with the provided JSON data
  3. See error

Screenshots
Screenshot 2022-06-27 at 12 17 07

Also managed to replicate the same issue in Carbone studio:
Screenshot 2022-06-27 at 12 19 15

Other comments

  • Traced down the issue to getValueOfPath in helper.js
    Debug mode throwing the following error: [[C_ERROR]] arr[1] not defined
    Screenshot 2022-06-27 at 12 20 57

  • Also tried the same template in .ods instead of excel with similar results

@menbatisiunissart menbatisiunissart added the T: bug Functionality that does not work as intended/expected label Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

1 participant