updated gdg js module with mode
fixed error in intial route if statement