Article - CS380976
JavaScript function Array.apply throws an error in Thingworx 9 : "Message :: TypeError: Cannot find default value for object." (regression from Thingworx 8)
Modified: 21-Nov-2022
Applies To
- ThingWorx Platform 9.0 to 9.3
Description
- JavaScript function Array.apply throws an error in Thingworx 9 (regression from Thingworx 8) :
Error executing service <service_name>. Message :: TypeError: Cannot find default value for object. - See Script Error Log for more details.
- Following code throws an error after upgrading Thingworx :
result = Array.apply(null, Array(3)).map(() => 0);
This is a printer-friendly version of Article 380976 and may be out of date. For the latest version click CS380976