From eee9ee4f516c2e89c5a04a4f33069f28c81f2c71 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Mon, 22 Jul 2024 20:33:01 +0200 Subject: [PATCH] Use Default value for loadout with no set name match Closes #7790 Signed-off-by: Tomas Slusny --- src/Modules/Build.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/Build.lua b/src/Modules/Build.lua index 59769f8ba3..08de9ab398 100644 --- a/src/Modules/Build.lua +++ b/src/Modules/Build.lua @@ -915,7 +915,7 @@ function buildMode:SyncLoadouts(reset) -- setName is only used for Tree currently and we strip the braces to get the plain name of the set, this is used as the name of the loadout for linkId in string.gmatch(linkIdentifier, "[^%,]+") do transferTable["setId"] = id - transferTable["setName"] = string.match(specTitle, "(.+)% {") + transferTable["setName"] = string.match(specTitle, "(.+)% {") or "Default" transferTable["linkId"] = linkId self.treeListSpecialLinks[linkId] = transferTable t_insert(sortedTreeListSpecialLinks, transferTable) @@ -937,7 +937,7 @@ function buildMode:SyncLoadouts(reset) if linkIdentifier then for linkId in string.gmatch(linkIdentifier, "[^%,]+") do transferTable["setId"] = set - transferTable["setName"] = string.match(setTitle, "(.+)% {") + transferTable["setName"] = string.match(setTitle, "(.+)% {") or "Default" specialLinks[linkId] = transferTable transferTable = {} end