Skip to content

Commit 21469a5

Browse files
committed
chore: update promise reject parameter to avoid lint error
1 parent 313e85a commit 21469a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/WebHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class WebHelper extends Helper {
149149

150150
const method = create ? 'post' : 'put';
151151

152-
if (!store) return Promise.reject('No appropriate stores');
152+
if (!store) return Promise.reject(new Error('No appropriate stores'));
153153

154154
let tool = this.assetTool;
155155
if (assetType.name === 'Project') {

test/unit/add-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class LoggingHelper {
3232
this.logContainer.push(this.label);
3333
return this.shouldSucceed ?
3434
Promise.resolve(new this.storage.Asset(assetType, assetId, dataFormat, Buffer.from(this.label))) :
35-
Promise.reject(`This is an expected failure from ${this.label}`);
35+
Promise.reject(new Error(`This is an expected failure from ${this.label}`));
3636
}
3737
}
3838

0 commit comments

Comments
 (0)