From 84bf09833e17725798cd71ceefe962473b8100c7 Mon Sep 17 00:00:00 2001 From: Oleksii Skorobogatko Date: Mon, 16 Dec 2024 19:13:25 +0200 Subject: [PATCH] #4 fix default params in jsdoc --- src/main/system.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/system.js b/src/main/system.js index 1d9eb9d..ee476bb 100644 --- a/src/main/system.js +++ b/src/main/system.js @@ -164,7 +164,7 @@ async function saveText(parentWindow, text, filename) { * * @param {Electron.Tray} tray * @param {Electron.Menu} contextMenu The tray context menu. - * @param {import('../models/clip').Model[]} clipItems=[] Appends the clipboard items to the context menu. + * @param {import('../models/clip').Model[]} [clipItems] Appends the clipboard items to the context menu. * @returns {Electron.Menu} The modified context menu. */ function updateTrayContextMenu(tray, contextMenu, clipItems) { @@ -193,7 +193,7 @@ function updateTrayContextMenu(tray, contextMenu, clipItems) { // In order for changes made to individual MenuItems to take effect, you have to call setContextMenu again. // https://www.electronjs.org/docs/latest/api/tray - tray.setContextMenu(contextMenu); + tray.setContextMenu(contextMenu); return contextMenu; } @@ -203,7 +203,7 @@ function updateTrayContextMenu(tray, contextMenu, clipItems) { * * @param {string} str * @param {number} limit A desired string limit. - * @param {string} trail='...' A trail appended to the end of the string longer than limit. + * @param {string} [trail='...'] A trail appended to the end of the string longer than limit. * @return {string} */ function stringCut(str, limit, trail = '...') {