Fix formatting

This commit is contained in:
Niklas von Hertzen 2017-12-03 17:30:52 +08:00
parent 0b4f922405
commit 0e8a924ea2
3 changed files with 4 additions and 5 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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();
}) });
}); });
}); });