We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25e4813 commit 268034dCopy full SHA for 268034d
src/tinify/Source.ts
@@ -77,11 +77,10 @@ export default class Source {
77
result(): Result {
78
const commands = this._commands
79
const response = this._url.then(url => {
80
- if(Object.keys(commands).length === 0){
81
- return tinify.client.request("get", url)
82
- } else {
+ if (Object.keys(commands).length > 0) {
83
return tinify.client.request("post", url, commands)
84
}
+ return tinify.client.request("get", url)
85
})
86
87
return new tinify.Result(
0 commit comments