Skip to content

Commit

Permalink
fix: remove net interface child before append (jeessy2#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessy2 authored Feb 7, 2023
1 parent a60c4d2 commit 9dbb2ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/writing.html
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,10 @@ <h5 class="portlet__head">Webhook</h5>
option.innerText = `${interface.Name}(${interface.Address.join(", ")})`
df.appendChild(option)
}
const ifElement = document.getElementById(`${label}_netInterface_select`)
ifElement.removeChild
const selectElement = document.getElementById(`${label}_netInterface_select`)
while(selectElement.lastChild) {
selectElement.removeChild(selectElement.lastChild)
}
document.getElementById(`${label}_netInterface_select`).appendChild(df)
// 选中
if ("{{$.Ipv4.NetInterface}}" !== "") {
Expand Down

0 comments on commit 9dbb2ac

Please sign in to comment.