Fix three-arg version of uci.delete (#1680)

This commit is contained in:
Tim Wilkinson 2024-11-07 20:32:51 -08:00 committed by GitHub
parent 722b13288e
commit f94ab2e2a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 4 deletions

View File

@ -220,10 +220,15 @@ const uciMethods =
} }
}, },
"delete": function(a, b) "delete": function(a, b, c)
{ {
this.init(); this.init();
cursor.delete(a, b); if (c === undefined) {
cursor.delete(a, b);
}
else {
cursor.delete(a, b, c);
}
}, },
error: function() error: function()
@ -295,10 +300,15 @@ const uciMeshMethods =
} }
}, },
"delete": function(a, b) "delete": function(a, b, c)
{ {
this.init(); this.init();
cursorm.delete(a, b); if (c === undefined) {
cursorm.delete(a, b);
}
else {
cursorm.delete(a, b, c);
}
}, },
error: function() error: function()