Fixed undefined variable editor in _onRedo