[3.1.0] Cannot assign to read only property 'form' of object
See original GitHub issueIn the latest 3.1 beta, if I have a button compoment like the below, any attempt to bind to the form
attribute triggers this error:
Uncaught TypeError: Cannot assign to read only property 'form' of object '#<HTMLButtonElement>'
at NewElementBuilder.__setProperty (vendor.js:29024)
at DefaultDynamicProperty.set (vendor.js:28014)
at NewElementBuilder.setDynamicAttribute (vendor.js:29035)
at ComponentElementOperations.flush (vendor.js:27024)
at Object.evaluate (vendor.js:26541)
at AppendOpcodes.evaluate (vendor.js:25357)
at LowLevelVM.evaluateSyscall (vendor.js:28562)
at LowLevelVM.evaluateInner (vendor.js:28538)
at LowLevelVM.evaluateOuter (vendor.js:28530)
at VM.next (vendor.js:30113)
import Component from '@ember/component';
export default Component.extend({
tagName: 'button',
attributeBindings: ['form']
});
{{my-button form="my-form"}}
This does not occur in 3.0
I would make a twiddle to reproduce but I can’t seem to remember how to point a twiddle at the beta 🤔
Possibly related to the glimmer-vm upgrade in https://github.com/emberjs/ember.js/pull/15828?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Cannot assign to read only property of Object in TypeScript
The TypeScript error "Cannot assign to read only property of object" occurs when we try to change a property of a frozen object...
Read more >angular - Cannot assign to read only property ... - Stack Overflow
After a global update of all my packages, everything started working again. The same for other users, check GitHub issue. My package.json:
Read more >[Cannot assign to read only property '<field_name>' of object ...
This type of error(Cannot assign to read-only property) generally occurs on update of public property @api decorator variable value.
Read more >Cannot assign to read only property '0' of string的报错原因之一 ...
2.1 报错原因. auditFailedInfor.certificationStatus数据在转为JSON前是一个object,转换了之后变成了string,所以我在对auditFailedInfor.
Read more >Defining Read Only Properties in JavaScript - YouTube
By using the Object.defineProperty method you are able to define properties as ' read only ' in JavaScript - this is done by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Exelord you can get the fix for this in 3.1 by pointing your
ember-source
tohttps://s3.amazonaws.com/builds.emberjs.com/release/shas/4cb565e3924363b165736cbaff8e4ee5d29218d7.tgz
in your package.json 👌The issue is almost certainly in glimmer-vm itself. I think the next step is to make a failing test PR over there. Based on your demo, I think it would basically be similar to this test…