mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix formatting
This commit is contained in:
parent
0b4f922405
commit
0e8a924ea2
@ -72,8 +72,7 @@
|
|||||||
"test:node": "mocha tests/node/*.js",
|
"test:node": "mocha tests/node/*.js",
|
||||||
"karma": "node karma",
|
"karma": "node karma",
|
||||||
"watch": "webpack --progress --colors --watch",
|
"watch": "webpack --progress --colors --watch",
|
||||||
"start": "node tests/server",
|
"start": "node tests/server"
|
||||||
"ss": "node $npm_package_version"
|
|
||||||
},
|
},
|
||||||
"homepage": "https://html2canvas.hertzen.com",
|
"homepage": "https://html2canvas.hertzen.com",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -41,7 +41,7 @@ const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => {
|
|||||||
|
|
||||||
const ownerDocument = element.ownerDocument;
|
const ownerDocument = element.ownerDocument;
|
||||||
if (!ownerDocument) {
|
if (!ownerDocument) {
|
||||||
return Promise.reject(`Provided element is not within a Document`)
|
return Promise.reject(`Provided element is not within a Document`);
|
||||||
}
|
}
|
||||||
const defaultView = ownerDocument.defaultView;
|
const defaultView = ownerDocument.defaultView;
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@ describe('Package', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should have html2canvas defined', done => {
|
it('should have html2canvas defined', done => {
|
||||||
html2canvas('').catch((err) => {
|
html2canvas('').catch(err => {
|
||||||
assert.equal(err, 'Provided element is not within a Document');
|
assert.equal(err, 'Provided element is not within a Document');
|
||||||
done();
|
done();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user