Skip to content

Commit 97d8f09

Browse files
author
Alessandro Rabitti
committed
Add optional chaining condition in notifier.js
1 parent 5692404 commit 97d8f09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/notifier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var NOTEDATA = [];
1414
* @return {undefined} this function does not return a value
1515
*/
1616
module.exports = function(text, displayLength, gd) {
17-
if(gd && gd._context && gd._context.displayNotifier === false) return;
17+
if(gd?._context?.displayNotifier === false) return;
1818
if(NOTEDATA.indexOf(text) !== -1) return;
1919

2020
NOTEDATA.push(text);

0 commit comments

Comments
 (0)