fix bug: window undefined in node