diff --git a/src/lib/Preview.js b/src/lib/Preview.js index 70537b54a..484507764 100644 --- a/src/lib/Preview.js +++ b/src/lib/Preview.js @@ -912,6 +912,14 @@ class Preview extends EventEmitter { } } + /** + * Wrapper around emit to prevent errors from affecting the client. + * + * @private + * @param {string} eventName - event name to emit + * @param {Object} [data] - event name to emit + * @return {void} + */ emit(eventName, data) { try { super.emit(eventName, data);