Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Uncaught ReferenceError: Promise is not defined' errors on Android devices #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix 'Uncaught ReferenceError: Promise is not defined' errors on Andro…
…id devices

I’ve implemented a global window error handler on my page, which logs
all javascript errors on my server. In this error log I get some
„Promise is not defined“ errors caused by the font watcher when running
on some strange Android browser versions.
  • Loading branch information
rototor committed Aug 29, 2017
commit 31553fa7d6a68077d60046b990f43cefddf1f3cb
2 changes: 1 addition & 1 deletion src/core/fontwatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ goog.scope(function () {
} else if (safari10Match) {
FontWatcher.SHOULD_USE_NATIVE_LOADER = false;
} else {
FontWatcher.SHOULD_USE_NATIVE_LOADER = true;
FontWatcher.SHOULD_USE_NATIVE_LOADER = !!window.Promise;
}
} else {
FontWatcher.SHOULD_USE_NATIVE_LOADER = false;
Expand Down