Skip to content

Commit cdec072

Browse files
committed
fix(excel-export): workaround an issue in codesandbox
1 parent eb38428 commit cdec072

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

projects/igniteui-angular/src/lib/core/setImmediate.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const run = (id) => {
3535

3636
const listener = (event) => run(event.data);
3737

38-
export const setImmediate = (cb: () => void, ...args) => {
38+
// Use function instead of arrow function to workaround an issue in codesandbox
39+
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
40+
export function setImmediate(cb: () => void, ...args) {
3941
if (window.setImmediate) {
4042
return window.setImmediate(cb);
4143
}
@@ -53,12 +55,13 @@ export const setImmediate = (cb: () => void, ...args) => {
5355
window.postMessage(counter + '', windowLocation.protocol + '//' + windowLocation.host);
5456

5557
return counter;
56-
};
58+
}
5759

58-
export const clearImmediate = (id: any) => {
60+
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
61+
export function clearImmediate(id: any) {
5962
if (window.clearImmediate) {
6063
return window.clearImmediate(id);
6164
}
6265

6366
delete queue[id];
64-
};
67+
}

0 commit comments

Comments
 (0)