Skip to content

Commit 1ae72ed

Browse files
committed
fix promise if already running
1 parent 102c420 commit 1ae72ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ class StaticServer {
5858

5959
start() {
6060
if( this.running ){
61-
return new new Promise((resolve, reject) => {
62-
resolve(this.origin);
63-
});
61+
return Promise.resolve(this.origin);
6462
}
6563

6664
this.started = true;

0 commit comments

Comments
 (0)