import Component from '@glimmer/component';
import fileQueue from 'ember-file-upload/helpers/file-queue';
export default class Foo extends Component {
@service fileQueue;
<template>
{{! Block A }}
<ul>
{{#each this.fileQueue.files as |file|}}
<li>
{{file.name}}
</li>
{{/each}}
</ul>
{{! Block B }}
{{#let (fileQueue) as |queue|}}
<label>
<input type='file' {{queue.selectFile}} hidden />
Select File
</label>
{{/let}}
</template>
}
ember.js:626 Uncaught (in promise) Error: Assertion Failed: You attempted to update `_value` on `TrackedStorageImpl`, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.
`_value` was first used:
- While rendering:
-top-level
application
index
(unknown template-only component)
(result of a `unknown` helper)
(result of a `unknown` helper)
(result of a `unknown` helper)
false.files
The problem
Given code:
The app will fail with:
Block AandBlock Bare swapped, the app works just fineVersions