Skip to content

bug: renameDevtoolsName - renameStore using un-indexed oldName #179

@richgenres

Description

@richgenres

When using multiple instances of Signal Store, addStore creates an index of storeNames like ["Store", "Store-1", "Store-2", "Store-3"]
but if renameDevtoolsName is called it fails with a throwIfNull - I can trace the code and see that during the renameDevtoolsName, renameStore is called, each oldName is always being passed as "Store", so renames the first ok, but then fails on all other renames in the storeNames array.

In order to rename the store, subsequent oldName should be passed in using the indexed name created in addStore eg: "Store-1", "Store-2" etc

Error
at throwIfNull (angular-architects-ngrx-toolkit.mjs:17:15)
at DevtoolsSyncer.renameStore (angular-architects-ngrx-toolkit.mjs:148:20)
at ___renameDevtoolsName (angular-architects-ngrx-toolkit.mjs:250:24)
at renameDevtoolsName (angular-architects-ngrx-toolkit.mjs:452:5)
....

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions