Fix falsy check on newUsername to use explicit null comparison

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 14:20:13 +08:00
parent 210364a255
commit b46ab4112a

View File

@@ -184,7 +184,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
try {
const response = await apiClient.put(apiEdit, {
username: editDetail.newUsername ? editDetail.newUsername : editDetail.username,
username: editDetail.newUsername != null ? editDetail.newUsername : editDetail.username,
password: editDetail.password,
name: editDetail.name,
is_active: editDetail.is_active,