mirror of
https://gitea.baerentsen.space/FrederikBaerentsen/BrickTracker.git
synced 2026-04-27 18:41:25 -05:00
fix(add): fixed #129, so bulk add can have trailing comma and not fail
This commit is contained in:
@@ -215,7 +215,10 @@ class BrickSetSocket extends BrickSocket {
|
||||
|
||||
if (this.html_input) {
|
||||
const value = this.html_input.value;
|
||||
this.set_list = value.split(",").map((el) => el.trim())
|
||||
// Split by comma, trim whitespace, and filter out empty strings
|
||||
this.set_list = value.split(",")
|
||||
.map((el) => el.trim())
|
||||
.filter((el) => el !== "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user