Skip to content

Commit d059ef7

Browse files
committed
🐛 修复后台脚本无法控制setInterval停止的问题 #207
fixes #207
1 parent 963a6d2 commit d059ef7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/filesystem/onedrive/onedrive.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ export default class OneDriveFileSystem implements FileSystem {
140140
return this.request(
141141
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${path}:/children`
142142
).then((data) => {
143-
console.log(data);
144143
const list: File[] = [];
145144
data.value.forEach((val: any) => {
146145
list.push({

src/runtime/content/exec_warp.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export class BgExecScriptWarp extends ExecScript {
4646
setTimeout.set(t, true);
4747
return t;
4848
};
49-
thisContext.clearTimeout = function (t: number | undefined) {
49+
thisContext.clearTimeout = function (t: number) {
50+
setTimeout.delete(t);
5051
global.clearTimeout(t);
5152
};
5253
thisContext.setInterval = function (
@@ -56,7 +57,6 @@ export class BgExecScriptWarp extends ExecScript {
5657
) {
5758
const t = global.setInterval(
5859
function () {
59-
setInterval.delete(t);
6060
if (typeof handler === "function") {
6161
handler();
6262
}
@@ -67,7 +67,8 @@ export class BgExecScriptWarp extends ExecScript {
6767
setInterval.set(t, true);
6868
return t;
6969
};
70-
thisContext.clearInterval = function (t: number | undefined) {
70+
thisContext.clearInterval = function (t: number) {
71+
setInterval.delete(t);
7172
global.clearInterval(t);
7273
};
7374
// @ts-ignore

0 commit comments

Comments
 (0)