Skip to content

Commit 268034d

Browse files
author
Eirini
committed
chore: cleaned up code
1 parent 25e4813 commit 268034d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tinify/Source.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ export default class Source {
7777
result(): Result {
7878
const commands = this._commands
7979
const response = this._url.then(url => {
80-
if(Object.keys(commands).length === 0){
81-
return tinify.client.request("get", url)
82-
} else {
80+
if (Object.keys(commands).length > 0) {
8381
return tinify.client.request("post", url, commands)
8482
}
83+
return tinify.client.request("get", url)
8584
})
8685

8786
return new tinify.Result(

0 commit comments

Comments
 (0)