Skip to content

Fixed bug with tools

Susheel Varma requested to merge ToolBugFix into dev

Created by: RobinKavPA

Fixed error occurring when data[0].relatedObjects was empty - it was actually null, not undefined so the array was never instantiated. Refactored to use ES6 spread operator and default empty array.

if (typeof data[0].relatedObjects === 'undefined') data[0].relatedObjects = []; data[0].relatedObjects.push({

Merge request reports