We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6aa6080 commit 1392d57Copy full SHA for 1392d57
src/attachment.ts
@@ -51,14 +51,14 @@ export default class Attachment {
51
this.percent = percent
52
}
53
54
- saved(attributes: {id?: string | null; href?: string | null; name?: string | null}) {
+ saved(attributes?: {id?: string | null; href?: string | null; name?: string | null}) {
55
if (this.state !== 'pending' && this.state !== 'saving') {
56
throw new Error(`Unexpected transition from ${this.state} to saved`)
57
58
this.state = 'saved'
59
- this.id = attributes.id
60
- this.href = attributes.href
61
- this.name = attributes.name
+ this.id = attributes?.id
+ this.href = attributes?.href
+ this.name = attributes?.name
62
63
64
isPending(): boolean {
0 commit comments