diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 2e05db5bb2..017e3f15ad 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -631,7 +631,7 @@ define([ if (typeof(b) == 'object') { if (b.value !== undefined) newBtns[b.value] = {text: b.caption, cls: 'custom' + ((b.primary || options.primary==b.value) ? ' primary' : '')}; - } else { + } else if (b!==undefined) { newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b || _.indexOf(options.primary, b)>-1) ? 'primary' : ''}; if (b=='custom') newBtns[b].cls += ' custom';