Skip to content

Release v1.1.0: new router constructor option - 'allowRegisterUpdateExisting'

Choose a tag to compare

@liorcodev liorcodev released this 18 May 10:09
· 11 commits to master since this release

[1.1.0] - 2025-05-18

Added

  • Introduced the allowRegisterUpdateExisting option to the router constructor. When enabled (true), invoking router.register() on an already registered path will return the existing store instance for that path instead of throwing an error, allowing the store's data to be updated. When disabled (false, default), attempting to register an existing path will throw an error as before.

Fixed

  • Ensured that when allowRegisterUpdateExisting is true, router.register() consistently returns the original store instance for an existing path, rather than creating a new instance. This guarantees that updates are applied to the correct store object.