JSFiddle - React, Tailwind, and code Playground

by iKanti

JavaScript

function x() {
  return Promise.reject(new Error('Expired Token'))
}
(async function() {
  await x();
})().catch(console.warn);
// the above code will print no:
// 'Unhandled Promise rejection: Expired Token ; Zone: <root> ; Task: null ; Value: Error: Expired Token'
// but the code below will:
import('https://unpkg.com/zone.js').then(() => {
  (async function() {
    await x();
  })().catch(console.warn);
});