check if container has child before removing it
check if container has child before removing it

Tyriar/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js