-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX lts] Allow computeds to have cycles in their deps
The bugfix for disallowed cycles in tracked props in #19138 attempted to also narrow the number of cycles that are allowed in general. Cycles should only be allowed for computed property deps, for legacy support reasons. The logic to allow cycles for these tags in particular was mistakenly added to `setup`, which runs on the _prototype_ of the class. This meant that _instance_ computed props were not allowed to have cycles, and this was causing failures in the ecosystem. Added a test that failed and is fixed with this change. I also attempted to create a cycle with `@alias` since it uses a different implementation, but I wasn't able to create one which didn't result in a Maximum Callstack style recursion error, so I think it's just not possible at all anyways, since `@alias` is eager always and never caches.
- Loading branch information
Chris Garrett
committed
Oct 1, 2020
1 parent
b0bc40f
commit b612d47
Showing
2 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters