From daefa58984836e07b6a7f3df3938d8f939767126 Mon Sep 17 00:00:00 2001 From: Devin Garner Date: Thu, 29 Aug 2019 12:51:54 -0600 Subject: [PATCH] Fix bug where customCriteria was always required The old logic: _instance.options.customCriteria !== null || _instance.options.customCriteria !== undefined will *ALWAYS* return true. --- src/addtohomescreen.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/addtohomescreen.js b/src/addtohomescreen.js index 3b52c91..bf7a4cd 100644 --- a/src/addtohomescreen.js +++ b/src/addtohomescreen.js @@ -664,8 +664,7 @@ this._canPrompt = false; - if ( _instance.options.customCriteria !== null || - _instance.options.customCriteria !== undefined ) { + if ( _instance.options.customCriteria) { var passCustom = false; @@ -995,4 +994,4 @@ // expose to the world window.addToHomescreen = ath; -} )( window, document ); \ No newline at end of file +} )( window, document );