You are using a default parameter feature which is supported only by Firefox now.
function errorNotification(text) {
text = text || "Something went wrong!";
$.pnotify({
title: 'Error',
text: text,
type: 'error'
});
}