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

Winter '20: TypeError: 'set' on proxy: trap returned falsish for property 'class' #3

Open
jclark-dot-org opened this issue Dec 6, 2019 · 2 comments

Comments

@jclark-dot-org
Copy link

When installed in a Winter '20 org, the component does not work.

Repro steps:

  1. Clone repo
  2. Create a scratch org
  3. Push source to scratch org
  4. Open scratch org. Open "Gantt Chart" app.
  5. Create a new Resource.
  6. Create a new Project.
  7. Click to Add Resource. Select the Resource.
  8. In the Gantt Chart, click a week to assign the resource to the project for that period. Nothing will happen.
  9. 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: #2

@cojilas
Copy link

cojilas commented Mar 5, 2020

@jclark-dot-org - was this ever resolved? I would love to mess with it in my developer org.

@tgentet-obrien
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants