mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-05 01:28:46 +08:00
fix #94 移动端加载失败
This commit is contained in:
parent
8f2c5f2117
commit
eeedf23e7c
@ -36,7 +36,8 @@ export default class Logger {
|
||||
console.error(e);
|
||||
}else {
|
||||
try {
|
||||
console.log(`OB-Douban:${moment(new Date()).format('YYYY-MM-DD HH:mm:SS')}:${typeof e == 'string' ? e : JSON.stringify(e)}`);
|
||||
let showMessage = typeof e == 'string' ? e : e.toString();
|
||||
console.log(`OB-Douban:${moment(new Date()).format('YYYY-MM-DD HH:mm:SS')}: ${showMessage}`);
|
||||
}catch (e) {
|
||||
console.log(`OB-Douban:${moment(new Date()).format('YYYY-MM-DD HH:mm:SS')}:` + e.toString());
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import {Platform} from "obsidian";
|
||||
|
||||
export class HttpResponse {
|
||||
private readonly _status:number;
|
||||
private readonly _headers:Record<string, string>;
|
||||
@ -32,8 +34,10 @@ export class HttpResponse {
|
||||
}
|
||||
|
||||
get textArrayBuffer():ArrayBuffer {
|
||||
if (this.text instanceof Buffer) {
|
||||
return this.text as Buffer;
|
||||
if (Platform.isDesktopApp) {
|
||||
if (this.text instanceof Buffer) {
|
||||
return this.text as Buffer;
|
||||
}
|
||||
}
|
||||
if (this.text instanceof ArrayBuffer) {
|
||||
return this.text as ArrayBuffer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user