mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-05 22:05:47 -05:00
fix console addon changes breaking lint tests
This commit is contained in:
@@ -102,7 +102,7 @@ export class ConsoleSelectionAddon implements ITerminalAddon {
|
||||
};
|
||||
|
||||
private selectionManager() {
|
||||
return (this.terminal as unknown as { selectionManager?: SelectionManager }).selectionManager;
|
||||
return Reflect.get(this.terminal, 'selectionManager') as SelectionManager | undefined;
|
||||
}
|
||||
|
||||
private drawnLineIndex(row: number) {
|
||||
|
||||
@@ -40,12 +40,15 @@ export class WebLinksAddon implements ITerminalAddon {
|
||||
detector.invalidateCache?.();
|
||||
}
|
||||
|
||||
this.providers.forEach((provider) => provider.dispose?.());
|
||||
for (const provider of this.providers) {
|
||||
provider.dispose?.();
|
||||
}
|
||||
|
||||
this.providers = [];
|
||||
this.replaced = [];
|
||||
}
|
||||
|
||||
private linkDetector() {
|
||||
return (this.terminal as unknown as { linkDetector?: LinkDetector }).linkDetector;
|
||||
return Reflect.get(this.terminal, 'linkDetector') as LinkDetector | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ const createTerminal = (rows: string[], scrollbackLength = rows.length, wrapped:
|
||||
const text = rows[y];
|
||||
|
||||
if (text === undefined) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
const cells = Array.from(text.padEnd(COLS, '\0'));
|
||||
const cells = [...text.padEnd(COLS, '\0')];
|
||||
|
||||
return {
|
||||
length: COLS,
|
||||
|
||||
Reference in New Issue
Block a user