added detect for browser, avoid error when the name property is empty