script editor
This commit is contained in:
@@ -115,7 +115,11 @@ func (d *Data) WithPatch(patches ...Patch) Data {
|
||||
}
|
||||
|
||||
if patch.Script != nil {
|
||||
newData.Scripts[patch.Script.Name] = patch.Script.Lines
|
||||
if len(patch.Script.Lines) > 0 {
|
||||
newData.Scripts[patch.Script.Name] = patch.Script.Lines
|
||||
} else {
|
||||
delete(newData.Scripts, patch.Script.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user