diff --git a/source/options/user-label-editor.tsx b/source/options/user-label-editor.tsx index cee97fd..30aa72b 100644 --- a/source/options/user-label-editor.tsx +++ b/source/options/user-label-editor.tsx @@ -58,15 +58,15 @@ class App extends Component { ); const id = await newUserLabelId(); - userLabels.push( - await createValueUserLabel({ - color: "#ff00ff", - id, - priority: 0, - text: "New Label", - username: existingUserLabel?.value.username ?? newLabelUsername, - }), - ); + const userLabel = await createValueUserLabel({ + color: "#ff00ff", + id, + priority: 0, + text: "New Label", + username: existingUserLabel?.value.username ?? newLabelUsername, + }); + await userLabel.save(); + userLabels.push(userLabel); unsavedUserLabelIds.add(id); this.setState({unsavedUserLabelIds, userLabels}); };