fix(testing): do not throw error for missing Ionic global

This commit is contained in:
Adam Bradley
2018-03-04 07:29:16 -06:00
parent b4590f4849
commit aa91d11726

View File

@ -36,10 +36,7 @@ import { IonicWindow } from './types/interfaces';
const win = (window as IonicWindow);
const Ionic = win.Ionic;
if (!Ionic) {
throw new Error(`ionic.js script missing from index.html`);
} else {
if (Ionic) {
console.log('bypassing zone');
Ionic.ael = function ngAddEventListener(elm, eventName, cb, opts) {
console.log('add listener', !!elm.__zone_symbol__addEventListener);
@ -66,5 +63,4 @@ if (!Ionic) {
win.requestAnimationFrame(cb);
}
};
}