Hello
found error if ajax response is empty or null or cannot connect to api server
"TypeError: Cannot convert undefined or null to object"
return this.model.insertOrUpdate({
**data: this.getDataFromResponse(response, config) || []**
})
Fixed
private async persistResponseData(
response: AxiosResponse,
config: Config
): Promise<Collections | null> {
if (!config.save) {
return null
}
if (config.delete !== undefined) {
await this.model.delete(config.delete as any)
return null
}
return this.model.insertOrUpdate({
data: this.getDataFromResponse(response, config) || []
})
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4