From 36371357cd834dde0cd5398715e61a9f04a8cfb1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 1 Dec 2016 14:16:33 -0800 Subject: [PATCH] buttonLabel -> Button label for consistency --- lib/browser/api/dialog.js | 4 ++-- spec/api-dialog-spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/browser/api/dialog.js b/lib/browser/api/dialog.js index d24a1f9..766d89c 100644 --- a/lib/browser/api/dialog.js +++ b/lib/browser/api/dialog.js @@ -78,7 +78,7 @@ module.exports = { if (options.buttonLabel == null) { options.buttonLabel = '' } 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) { options.defaultPath = '' @@ -111,7 +111,7 @@ module.exports = { if (options.buttonLabel == null) { options.buttonLabel = '' } 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) { options.defaultPath = '' diff --git a/spec/api-dialog-spec.js b/spec/api-dialog-spec.js index 3f8f570..6391edc 100644 --- a/spec/api-dialog-spec.js +++ b/spec/api-dialog-spec.js @@ -14,7 +14,7 @@ describe('dialog module', () => { assert.throws(() => { dialog.showOpenDialog({buttonLabel: []}) - }, /buttonLabel must be a string/) + }, /Button label must be a string/) assert.throws(() => { dialog.showOpenDialog({defaultPath: {}}) @@ -30,7 +30,7 @@ describe('dialog module', () => { assert.throws(() => { dialog.showSaveDialog({buttonLabel: []}) - }, /buttonLabel must be a string/) + }, /Button label must be a string/) assert.throws(() => { dialog.showSaveDialog({defaultPath: {}}) -- 2.7.4