Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
Don't show undefined as title or text when empty. Fix version number …
Browse files Browse the repository at this point in the history
…in error message
  • Loading branch information
Christoph Gross committed Feb 1, 2016
1 parent d499caa commit e5300a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
}
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e5300a0

Please sign in to comment.