From 452a48e7f4782cf9bdf08b554264ab3cdcb12685 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Fri, 3 Mar 2023 10:06:59 +0900 Subject: fix(server): DriveFile related N+1 query when call note packMany (#10133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(server): DriveFile related N+1 query when call note packMany * Update packages/backend/src/misc/is-not-null.ts Co-authored-by: Acid Chicken (硫酸鶏) * ignore lint * 途中でやめたやつが混入していた * fix: 順番通りである必要がある場所で順番通りになっていなかった --------- Co-authored-by: Acid Chicken (硫酸鶏) --- packages/backend/src/misc/is-not-null.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/backend/src/misc/is-not-null.ts (limited to 'packages/backend/src/misc/is-not-null.ts') diff --git a/packages/backend/src/misc/is-not-null.ts b/packages/backend/src/misc/is-not-null.ts new file mode 100644 index 0000000000..d89a1957be --- /dev/null +++ b/packages/backend/src/misc/is-not-null.ts @@ -0,0 +1,5 @@ +// we are using {} as "any non-nullish value" as expected +// eslint-disable-next-line @typescript-eslint/ban-types +export function isNotNull(input: T | undefined | null): input is T { + return input != null; +} -- cgit v1.2.3-freya