GanttChart
GanttChart copied to clipboard
Winter '20: TypeError: 'set' on proxy: trap returned falsish for property 'class'
When installed in a Winter '20 org, the component does not work.
Repro steps:
- Clone repo
- Create a scratch org
- Push source to scratch org
- Open scratch org. Open "Gantt Chart" app.
- Create a new Resource.
- Create a new Project.
- Click to Add Resource. Select the Resource.
- In the Gantt Chart, click a week to assign the resource to the project for that period. Nothing will happen.
- Open your browser's Javascript console. You will see an error:
Uncaught (in promise) TypeError: 'set' on proxy: trap returned falsish for property 'class'
at eval (/lightning/r/Resource__c/a0256000003puG4AAI/modules/c/gantt_chart_resource.js:4)
at Jn.l (aura_prod.js:27)
at Array.forEach (<anonymous>)
at Proxy.l (aura_prod.js:27)
at eval (/lightning/r/Resource__c/a0256000003puG4AAI/modules/c/gantt_chart_resource.js:4)
at Array.forEach (<anonymous>)
at g.setProjects (/lightning/r/Resource__c/a0256000003puG4AAI/modules/c/gantt_chart_resource.js:4)
at g.set resource (/lightning/r/Resource__c/a0256000003puG4AAI/modules/c/gantt_chart_resource.js:4)
at g.set (aura_prod.js:3)
at setHook (aura_prod.js:27)
Pull Request to fix: https://github.com/SalesforceLabs/GanttChart/pull/2
@jclark-dot-org - was this ever resolved? I would love to mess with it in my developer org.
@jclark-dot-org I fixed this by going to the gantt_chart_resource.js file, add this after line 239 and before line 240:
allocation = Object.assign({}, allocation);
The allocation object is locked, so if you want to be able to change the Objects properties or values, then you need to first clone the Object to allow you to make amendments