Okay so ash was battling against the gym leader roxanne and ash told pikachu to use thunder on geodude.The thunder was effective and geodude was unable to battle.Electric type moves have no effect on ground but in this episode it has been effective.Was it an error?