argument icon indicating copy to clipboard operation
argument copied to clipboard

Cannot assign to read only property 'entity' of object '[object Object]'

Open VincentMolinie opened this issue 5 years ago • 2 comments

Hi, I tried to use you library on version v1.0.0-beta.2 With the following code:

import Component from '@ember/component';
import { tagName } from '@ember-decorators/component';
import { argument } from '@ember-decorators/argument';
import { Action } from '@ember-decorators/argument/types';
import Model from '@ember-data/model';

@tagName('')
export default class MyComponent extends Component {
  @argument(Model) entity;
  @argument(Action) save;
  @argument(Action) discard;
}

But I keep getting the following error:

Cannot assign to read only property 'entity' of object '[object Object]'

It works perfectly fine on v0.8.21.

What am I doing wrong ?

VincentMolinie avatar May 20 '20 06:05 VincentMolinie

What Ember version are you using?

alexlafroscia avatar May 20 '20 15:05 alexlafroscia

Ember 3.12.2

VincentMolinie avatar Jun 02 '20 14:06 VincentMolinie