added check to make sure there's data in the next before localstorage
Merge pull request #763 from tonyrd/development

added check to make sure there's data in the next before localstorage