fix: linter errors
This commit is contained in:
@@ -513,8 +513,7 @@ export class KGDebugger {
|
||||
|
||||
try {
|
||||
textarea.selectionStart = textarea.selectionEnd = typed.length;
|
||||
} catch {
|
||||
}
|
||||
} catch { /* setting cursor position can fail in read-only or special inputs */ }
|
||||
|
||||
textarea.scrollTop = textarea.scrollHeight;
|
||||
|
||||
@@ -583,8 +582,7 @@ export class KGDebugger {
|
||||
|
||||
try {
|
||||
textarea.selectionStart = textarea.selectionEnd = typed.length;
|
||||
} catch {
|
||||
}
|
||||
} catch { /* setting cursor position can fail in read-only or special inputs */ }
|
||||
|
||||
textarea.scrollTop = textarea.scrollHeight;
|
||||
|
||||
|
||||
@@ -47,9 +47,8 @@ class MockFileHandle {
|
||||
async getFile() { return { text: () => Promise.resolve(this._content) }; }
|
||||
async createWritable() {
|
||||
const w = new MockWritable();
|
||||
const self = this;
|
||||
const origClose = w.close.bind(w);
|
||||
w.close = async () => { self._content = w.data; await origClose(); };
|
||||
w.close = async () => { this._content = w.data; await origClose(); };
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,9 @@ class MockFileSystemFileHandle {
|
||||
async createWritable() {
|
||||
const stream = new MockFileSystemWritableFileStream();
|
||||
// When stream closes, update our content
|
||||
const self = this;
|
||||
const origClose = stream.close.bind(stream);
|
||||
stream.close = async () => {
|
||||
self._content = stream.data;
|
||||
this._content = stream.data;
|
||||
await origClose();
|
||||
};
|
||||
return stream;
|
||||
|
||||
Reference in New Issue
Block a user