Skip to content

However, when I pass a null value for a certain key into storeToRefs, it will throw an error. #2848

@Jv-Juven

Description

@Jv-Juven

Reproduction

Steps to reproduce the bug

In the function definition within the file "pinia/packages/pinia/src/storeToRefs.ts", if the property value of the object rawStore obtained from const rawStore = toRaw(store) might be null, an error will occur.
image
image

Expected behavior

When the final computed value of rawStore is { projectId: null, name: null }, the program can execute normally.

Actual behavior

image

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions