I've noticed that if the terminal is hidden and the screen experiences a resize trigger from a blur / focus, it can cause the dimensions to be undefined. This creates an exception in Xterm.js that the values are not integers. Figured it would be ok to just check before doing a resize.