Skip to content

Commit a593016

Browse files
committed
fix
1 parent f293138 commit a593016

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

resources/views/app.blade.php

+14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
if (globalThis === undefined) {
1111
var globalThis = window;
1212
}
13+
const allSettled = (promises) => {
14+
// map the promises to return custom response.
15+
const mappedPromises = promises.map(
16+
p => Promise.resolve(p)
17+
.then(
18+
val => ({ status: 'fulfilled', value: val }),
19+
err => ({ status: 'rejected', reason: err })
20+
)
21+
);
22+
23+
// run all the promises once with .all
24+
return Promise.all(mappedPromises);
25+
}
26+
Promise.allSettled = allSettled;
1327
</script>
1428

1529
<!-- Scripts -->

vite.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import svgLoader from 'vite-svg-loader';
55

66
export default defineConfig({
77
build: {
8-
target: 'es2015',
8+
target: 'chrome70',
99
},
1010
plugins: [
1111
laravel({

0 commit comments

Comments
 (0)