Fix Uncaught TypeError when opts is undefined
3.3.1