fix(add): fixed #129, so bulk add can have trailing comma and not fail

This commit is contained in:
FrederikBaerentsen
2025-12-29 09:42:48 -05:00
parent 423540bba4
commit a72cb67c8c
+4 -1
View File
@@ -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 !== "")
}
}