Skip to content

Instantly share code, notes, and snippets.

@simple17
Created March 30, 2020 09:45
Show Gist options
  • Save simple17/2139e9fddf3230da9feec0df8afe2f53 to your computer and use it in GitHub Desktop.
Save simple17/2139e9fddf3230da9feec0df8afe2f53 to your computer and use it in GitHub Desktop.
[Check Variable Promise]
const checkActiveModals = function() {
return new Promise(function (resolve, reject) {
(function waitForModals(){
if (!isAnySuggestModalShown) return resolve();
setTimeout(waitForModals, 500);
})();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment