[PR #369] [MERGED] Start MenuRole enum at 1. #1152

Open
opened 2026-01-29 16:57:51 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ElectronNET/Electron.NET/pull/369
Author: @jjuback
Created: 2/7/2020
Status: Merged
Merged: 4/18/2020
Merged by: @GregorBiswanger

Base: masterHead: master


📝 Commits (2)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 ElectronNET.API/Entities/MenuRole.cs (+1 -1)

📄 Description

Fix for issue #368. In ElectronNET.API/Menu.cs, the JsonSerializer ignores null/default values, so when a menu item is created as new MenuItem { Role = MenuRole.undo }, it is serialized as an empty object instead of { role: "undo" }. Starting the enum at 1 fixes this problem.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ElectronNET/Electron.NET/pull/369 **Author:** [@jjuback](https://github.com/jjuback) **Created:** 2/7/2020 **Status:** ✅ Merged **Merged:** 4/18/2020 **Merged by:** [@GregorBiswanger](https://github.com/GregorBiswanger) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`92356d3`](https://github.com/ElectronNET/Electron.NET/commit/92356d3587e849689715ecbd64ddc000605ede43) Start MenuRole enum at 1. - [`88b0437`](https://github.com/ElectronNET/Electron.NET/commit/88b04377a7b0dac1feaa23aea19674b7a658af21) Merge branch 'master' of https://github.com/ElectronNET/Electron.NET ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ElectronNET.API/Entities/MenuRole.cs` (+1 -1) </details> ### 📄 Description Fix for issue #368. In ElectronNET.API/Menu.cs, the JsonSerializer ignores null/default values, so when a menu item is created as `new MenuItem { Role = MenuRole.undo }`, it is serialized as an empty object instead of `{ role: "undo" }`. Starting the enum at 1 fixes this problem. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:57:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1152