(handler: any, arg?: any)
| 834 | * tracking software can log it. |
| 835 | */ |
| 836 | export const safeCall = (handler: any, arg?: any) => { |
| 837 | if (typeof handler === 'function') { |
| 838 | const jmp = config.get('_zoneGate', defaultGate); |
| 839 | return jmp(() => { |
| 840 | try { |
| 841 | return handler(arg); |
| 842 | } catch (e) { |
| 843 | throw e; |
| 844 | } |
| 845 | }); |
| 846 | } |
| 847 | return undefined; |
| 848 | }; |
| 849 | |
| 850 | export const BACKDROP = 'backdrop'; |
| 851 | export const GESTURE = 'gesture'; |
no test coverage detected