mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
hotfix: fix Cannot read properties of undefined (reading 'removeChild')
This commit is contained in:
@ -138,12 +138,16 @@ export default async () => {
|
|||||||
|
|
||||||
ipcRenderer.on('refreshMenu', () => updateMenu());
|
ipcRenderer.on('refreshMenu', () => updateMenu());
|
||||||
ipcRenderer.on('window-maximize', () => {
|
ipcRenderer.on('window-maximize', () => {
|
||||||
maximizeButton.removeChild(maximizeButton.firstChild!);
|
if (isNotWindowsOrMacOS && maximizeButton.firstChild) {
|
||||||
maximizeButton.appendChild(unmaximize);
|
maximizeButton.removeChild(maximizeButton.firstChild);
|
||||||
|
maximizeButton.appendChild(unmaximize);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
ipcRenderer.on('window-unmaximize', () => {
|
ipcRenderer.on('window-unmaximize', () => {
|
||||||
maximizeButton.removeChild(maximizeButton.firstChild!);
|
if (isNotWindowsOrMacOS && maximizeButton.firstChild) {
|
||||||
maximizeButton.appendChild(maximize);
|
maximizeButton.removeChild(maximizeButton.firstChild);
|
||||||
|
maximizeButton.appendChild(unmaximize);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isEnabled('picture-in-picture')) {
|
if (isEnabled('picture-in-picture')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user