Skip to content

A bug when a field has undefined value #39

Closed
@plantain-00

Description

@plantain-00

just use vue, this works

data: {
    key: undefined
}

use vue-class-component, the key is not found

class Foo extends Vue {
    key = undefined;
}

I checked the source code, should be: https://github.com/vuejs/vue-class-component/blob/master/src/data.ts#L23

if (data[key] !== undefined) {
  plainData[key] = data[key]
}

the type of my key is undefined | null, so I cannot use null to replace undefined.

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