From 157eab2deebf527908a4d03cfbe8d36078b57c10 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 31 Aug 2022 06:55:31 -0400 Subject: [PATCH] foundkey-js: make DriveFile.comment nullable There's a few places in the client code that checks for a null comment, suggesting this field may be set to null. --- packages/foundkey-js/CHANGELOG.md | 1 + packages/foundkey-js/src/entities.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/foundkey-js/CHANGELOG.md b/packages/foundkey-js/CHANGELOG.md index c48715d52..fafd92f0f 100644 --- a/packages/foundkey-js/CHANGELOG.md +++ b/packages/foundkey-js/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - foundkey-js is now part of the main FoundKey repo - BREAKING: foundkey-js now uses ES2020 modules. Ensure that your version of Node supports them. +- The `comment` property of `DriveFile` is now nullable. Make sure to check that this property is not `null` before accessing it. ## 0.0.15 - 2022-07-22 ### Changed diff --git a/packages/foundkey-js/src/entities.ts b/packages/foundkey-js/src/entities.ts index 8fcb9e8b9..90cee3f4d 100644 --- a/packages/foundkey-js/src/entities.ts +++ b/packages/foundkey-js/src/entities.ts @@ -117,7 +117,7 @@ export type DriveFile = { size: number; md5: string; blurhash: string; - comment: string; + comment: string | null; properties: Record; };