You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebglAddon.ts:40 Uncaught TypeError: Cannot read properties of undefined (reading 'colors')
at t2.WebglAddon.activate (WebglAddon.ts:40:69)
at t2.AddonManager.loadAddon (AddonManager.ts:31:14)
at d.loadAddon (Terminal.ts:239:24)
at initXterm (Console.vue:123:9)
at ws.onopen (Console.vue:82:28)
The WebglAddon.ts 40 line is: const colors: IColorSet = (terminal as any)._core._colorManager.colors;
The text was updated successfully, but these errors were encountered:
Details
My code
/** init xterm **/
const fitAddon = new FitAddon();
const webglAddon = new WebglAddon();
let xterm = new Terminal({ allowProposedApi: true })
function initXterm(scrollback: string) {
let scrollNumber = parseInt(scrollback, 10)
xterm = new Terminal({
screenReaderMode: false,
convertEol: true,
allowProposedApi: true,
scrollback: isValidNumber(scrollNumber) ? scrollNumber : DEFAULT_SCROLL_BACK
});
xterm.loadAddon(fitAddon)
xterm.open(document.getElementById('terminal')!);
xterm.loadAddon(webglAddon)
fitAddon.fit()
return {
cols: xterm.cols,
rows: xterm.rows
}
}
Debug problems
WebglAddon.ts:40 Uncaught TypeError: Cannot read properties of undefined (reading 'colors')
at t2.WebglAddon.activate (WebglAddon.ts:40:69)
at t2.AddonManager.loadAddon (AddonManager.ts:31:14)
at d.loadAddon (Terminal.ts:239:24)
at initXterm (Console.vue:123:9)
at ws.onopen (Console.vue:82:28)
The WebglAddon.ts 40 line is: const colors: IColorSet = (terminal as any)._core._colorManager.colors;
The text was updated successfully, but these errors were encountered: