Fix Bug: judge whether localStorage exists use key error