[SOLVED] Making a default menu does not work


#1

I tried the code exactly as the example in the docs, but nothing happens, and the resulting menu is blank:

46%20PM

What’s missing??


#2

Figured it out. The code needs to be fired in the ready event, otherwise it does not work:

app.on( 'ready', () => {

	const menu = Menu.buildFromTemplate(template)
	Menu.setApplicationMenu(menu)

})

The docs didn’t mention it.