Uncaught TypeError: Reduce of empty array with no initial value 
when loaded new html page