mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
prettier --write
This commit is contained in:
parent
450528ff00
commit
8a0be3212d
164 changed files with 7053 additions and 9008 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import window from 'window';
|
||||
|
||||
// let rainloopCaches = window.caches && window.caches.open ? window.caches : null;
|
||||
|
|
@ -9,19 +8,15 @@ import window from 'window';
|
|||
* @returns {Promise}
|
||||
*/
|
||||
export function jassl(src, async = false) {
|
||||
|
||||
if (!window.Promise || !window.Promise.all)
|
||||
{
|
||||
if (!window.Promise || !window.Promise.all) {
|
||||
throw new Error('Promises are not available your environment.');
|
||||
}
|
||||
|
||||
if (!src)
|
||||
{
|
||||
if (!src) {
|
||||
throw new Error('src should not be empty.');
|
||||
}
|
||||
|
||||
return new window.Promise((resolve, reject) => {
|
||||
|
||||
const element = window.document.createElement('script');
|
||||
|
||||
element.onload = () => {
|
||||
|
|
@ -36,7 +31,7 @@ export function jassl(src, async = false) {
|
|||
element.src = src;
|
||||
|
||||
window.document.body.appendChild(element);
|
||||
})/* .then((s) => {
|
||||
}) /* .then((s) => {
|
||||
|
||||
const found = s && rainloopCaches ? s.match(/rainloop\/v\/([^\/]+)\/static\//) : null;
|
||||
if (found && found[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue