From e5300a095625aad10f650ba603c46b9d621b7dd0 Mon Sep 17 00:00:00 2001 From: Christoph Gross Date: Mon, 1 Feb 2016 16:37:16 +0100 Subject: [PATCH] Don't show undefined as title or text when empty. Fix version number in error message --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index b3b5a93..939cfab 100644 --- a/index.js +++ b/index.js @@ -258,9 +258,9 @@ function notify(notification) { return notification.id } else { - // Since 3.0.0 all notification parameters need to be passed + // Since 1.0.0 all notification parameters need to be passed // as object. - log('nw-notify: ERROR since version 3.0.0 notify() only accepts a single object with notification parameters. The use of notify(title, text, ...) was deprecated and removed.') + log('nw-notify: ERROR since version 1.0.0 notify() only accepts a single object with notification parameters. The use of notify(title, text, ...) was deprecated and removed.') } } @@ -402,10 +402,10 @@ function setNotficationContents(notiDoc, notificationObj) { // Title var titleDoc = notiDoc.getElementById('title') - titleDoc.innerHTML = notificationObj.title + titleDoc.innerHTML = notificationObj.title || '' // message var messageDoc = notiDoc.getElementById('message') - messageDoc.innerHTML = notificationObj.text + messageDoc.innerHTML = notificationObj.text || '' // Image var imageDoc = notiDoc.getElementById('image') if (notificationObj.image) {