mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
fix(testing): do not throw error for missing Ionic global
This commit is contained in:
@ -36,10 +36,7 @@ import { IonicWindow } from './types/interfaces';
|
|||||||
const win = (window as IonicWindow);
|
const win = (window as IonicWindow);
|
||||||
const Ionic = win.Ionic;
|
const Ionic = win.Ionic;
|
||||||
|
|
||||||
if (!Ionic) {
|
if (Ionic) {
|
||||||
throw new Error(`ionic.js script missing from index.html`);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log('bypassing zone');
|
console.log('bypassing zone');
|
||||||
Ionic.ael = function ngAddEventListener(elm, eventName, cb, opts) {
|
Ionic.ael = function ngAddEventListener(elm, eventName, cb, opts) {
|
||||||
console.log('add listener', !!elm.__zone_symbol__addEventListener);
|
console.log('add listener', !!elm.__zone_symbol__addEventListener);
|
||||||
@ -66,5 +63,4 @@ if (!Ionic) {
|
|||||||
win.requestAnimationFrame(cb);
|
win.requestAnimationFrame(cb);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user