0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

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
This commit is contained in:
Trevor Buckner
2023-01-09 14:12:57 -05:00
committed by Victor Losada Hernandez
parent 01b03e8683
commit 7e4018351d

View File

@@ -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;