Added fix on the js error due to the variable not being initialized properly.  Solution was to just call a function that would return the required data structure for the function.

GCP-10342

Reviewer: Chezka Arevalo