Skip to content

Commit 6c72443

Browse files
committed
Fix eslint complaints
Signed-off-by: RD WebDesign <[email protected]>
1 parent ad802f9 commit 6c72443

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/js/settings-dhcp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ $(document).on("click", ".save-static-row", function () {
314314
$("td", row).removeClass("table-danger");
315315

316316
// Check if all rows were already saved (no rows are still being edited)
317-
if ($("#StaticDHCPTable .save-static-row").length == 0) {
317+
if ($("#StaticDHCPTable .save-static-row").length === 0) {
318318
// Re-enable all table buttons
319319
$("#StaticDHCPTable button").prop("disabled", false);
320320
// and re-enable the textarea
@@ -365,7 +365,7 @@ $(document).on("focus input", "#StaticDHCPTable td[contenteditable]", function (
365365
$("#StaticDHCPTable .delete-static-row, #StaticDHCPTable .add-static-row").prop("disabled", true);
366366

367367
// Add save button (a hint asking to click on the button will be shown below the table - CSS pseudo-element)
368-
if (row.find(".save-static-row").length == 0) {
368+
if (row.find(".save-static-row").length === 0) {
369369
const idx = row.attr("data-row");
370370
const saveBtn = $(
371371
'<button type="button" class="btn btn-success btn-xs save-static-row"><i class="fa fa-fw fa-check"></i></button>'

scripts/js/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function validateIPv6Brackets(ip) {
270270
}
271271

272272
// Strip brackets before validating the IPv6
273-
const ipWithoutBrackets = ip.replace(/[\[\]]/g, "");
273+
const ipWithoutBrackets = ip.replaceAll(/[[\]]/vg, "");
274274
// Validate the ip
275275
return validateIPv6(ipWithoutBrackets);
276276
}

0 commit comments

Comments
 (0)