From 8cbab4d4ce07ce866fb66437e9d2a8e5a726844d Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 9 Jan 2023 14:12:57 -0500 Subject: [PATCH] Fix saving issue when tags do not exist Rare case where tags don't exist at all; gets confused in the step of converting tag strings to arrays --- server/homebrew.api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 47a6e7f42..18269a639 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -77,8 +77,8 @@ If you believe you should have access to this brew, ask the file owner to invite } // Clean up brew: fill in missing fields with defaults / fix old invalid values - stub.tags = stub.tags || undefined; // Clear empty strings - stub.renderer = stub.renderer || undefined; // Clear empty strings + stub.tags = stub?.tags || undefined; // Clear empty strings + stub.renderer = stub?.renderer || undefined; // Clear empty strings stub = _.defaults(stub, DEFAULT_BREW_LOAD); // Fill in blank fields req.brew = stub;