buttonLabel -> Button label for consistency
This commit is contained in:
parent
750bd9a88b
commit
36371357cd
2 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,7 @@ module.exports = {
|
||||||
if (options.buttonLabel == null) {
|
if (options.buttonLabel == null) {
|
||||||
options.buttonLabel = ''
|
options.buttonLabel = ''
|
||||||
} else if (typeof options.buttonLabel !== 'string') {
|
} else if (typeof options.buttonLabel !== 'string') {
|
||||||
throw new TypeError('buttonLabel must be a string')
|
throw new TypeError('Button label must be a string')
|
||||||
}
|
}
|
||||||
if (options.defaultPath == null) {
|
if (options.defaultPath == null) {
|
||||||
options.defaultPath = ''
|
options.defaultPath = ''
|
||||||
|
@ -111,7 +111,7 @@ module.exports = {
|
||||||
if (options.buttonLabel == null) {
|
if (options.buttonLabel == null) {
|
||||||
options.buttonLabel = ''
|
options.buttonLabel = ''
|
||||||
} else if (typeof options.buttonLabel !== 'string') {
|
} else if (typeof options.buttonLabel !== 'string') {
|
||||||
throw new TypeError('buttonLabel must be a string')
|
throw new TypeError('Button label must be a string')
|
||||||
}
|
}
|
||||||
if (options.defaultPath == null) {
|
if (options.defaultPath == null) {
|
||||||
options.defaultPath = ''
|
options.defaultPath = ''
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('dialog module', () => {
|
||||||
|
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
dialog.showOpenDialog({buttonLabel: []})
|
dialog.showOpenDialog({buttonLabel: []})
|
||||||
}, /buttonLabel must be a string/)
|
}, /Button label must be a string/)
|
||||||
|
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
dialog.showOpenDialog({defaultPath: {}})
|
dialog.showOpenDialog({defaultPath: {}})
|
||||||
|
@ -30,7 +30,7 @@ describe('dialog module', () => {
|
||||||
|
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
dialog.showSaveDialog({buttonLabel: []})
|
dialog.showSaveDialog({buttonLabel: []})
|
||||||
}, /buttonLabel must be a string/)
|
}, /Button label must be a string/)
|
||||||
|
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
dialog.showSaveDialog({defaultPath: {}})
|
dialog.showSaveDialog({defaultPath: {}})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue