http service object fix

This commit is contained in:
Drew Ansbacher
2021-07-20 11:16:45 -06:00
committed by Aiden McClelland
parent d1b8f51b78
commit 2ff9c622ac
2 changed files with 3 additions and 1 deletions

View File

@@ -471,6 +471,7 @@ export class MockApiService extends ApiService {
value: PackageState.Removing,
},
]
const res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
setTimeout(async () => {
const patch = [
@@ -481,6 +482,7 @@ export class MockApiService extends ApiService {
]
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
}, this.revertTime)
return res
}

View File

@@ -70,7 +70,7 @@ export class HttpService {
this.fullUrl + httpOpts.url :
httpOpts.url
Object.keys(httpOpts.params).forEach(key => {
Object.keys(httpOpts.params || { }).forEach(key => {
if (httpOpts.params[key] === undefined) {
delete httpOpts.params[key]
}