Skip to content

Commit 6b915ad

Browse files
authored
fix(Angular): add workaround for Safari / Webdriver problem
Closes angular#16645
1 parent a42f8a0 commit 6b915ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Angular.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,13 @@ function angularInit(element, bootstrap) {
16951695
});
16961696
if (appElement) {
16971697
if (!isAutoBootstrapAllowed) {
1698-
window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +
1698+
try {
1699+
window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +
16991700
'an extension, document.location.href does not match.');
1701+
} catch (e) {
1702+
// Support: Safari 11 w/ Webdriver
1703+
// The console.error will throw and make the test fail
1704+
}
17001705
return;
17011706
}
17021707
config.strictDi = getNgAttribute(appElement, 'strict-di') !== null;

0 commit comments

Comments
 (0)