Created
December 5, 2020 12:48
-
-
Save smpnjn/c192a2aa89767a4194cb3ddbd0658382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Two promises | |
const server1 = await import('https://get.useastserver.com/js/majorFile.js'); | |
const server2 = await import('https://get.euserver.com/js/majorFile.js'); | |
// First one that resolves will be used. | |
// If it rejects instead, it will be ignored. | |
Promise.any([server1, server2]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment