JS/KO error '$index is not defined' in Settings > Accounts
SergeyMosin opened this issue · 2 comments
SergeyMosin commented
Describe the bug
Clicking on the Accounts
tab in the Settings
does not work on the first try in v2.38.1
Details
Browser console error:
Uncaught ReferenceError: Unable to process binding "template: () => ({ name: RoutedSettingsViewModel.template })"
Message: Unable to process binding "foreach: ()=>(identities)"
Message: Unable to process binding "visible: ()=>(0 === $index())"
Message: $index is not defined
This is most like a regression from c14bbab
Possible fix is to replace this:
with something like this:
<span class="identity-default" data-bind="visible: id() === ''" data-i18n="GLOBAL/DEFAULT"></span>
only secondary identities have id
s
the-djmaze commented
I had the same error once and never again.
Will try to replicate and see what causes it.
the-djmaze commented
Although it is fixed, i might have a better approach for the deprecated with
statement.
It also makes the template bindings much more secure.
I have to test this change how much it will impact the speed.
904a353