Fix eslint rules

This commit is contained in:
Pavel Dohnal
2019-01-23 14:19:23 +01:00
parent 91c974e08f
commit 20ae36cf0b
6 changed files with 9 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ export const fromDom = element => html2canvas(element, {
*/
export const fromUrl = url => new Promise((resolve, reject) => {
const iframe = document.createElement('iframe');
const protocol = location.href.startsWith('https://') ? 'https:' : 'http:';
const protocol = document.location.href.startsWith('https://') ? 'https:' : 'http:';
iframe.src = protocol + url.replace(/^https?:/, '');
iframe.style.opacity = 0;
iframe.scrolling = 'no';