Skip to content

[storage] When default value is null/undefined, storage is typed and the value is an object, it's not correctly serializing the value #247

Description

@Jonathazn

Steps to Reproduce

  1. Initialize a class property with storage<MyObject | null>(null)
  2. Set said class property with a value of type MyObject: this.myObject.set({foo: "bar"});
  3. Browser storage will show value as [object Object] and value wont be able to deserialized on page refresh

Expected Behavior

Not only default value but also typed reference is used to check which Serializer should be used to write and read from storage.

Actual Behavior

Incorrect Serializer is used to write and read from storage.

Signality version

0.5.0

Angular version

21.2.6

Browser

Mozilla Firefox

Operating system

macOS

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions