weixsong / elasticlunr.js

Based on lunr.js, but more flexible and customized.
http://elasticlunr.com
MIT License
2.02k stars 147 forks source link

Removed clone() method #123

Closed engelkek closed 2 years ago

engelkek commented 3 years ago

The way the clone() method worked, by calling Object.constructor(), is causing TypeErrors in recent browsers. As the documentation for the clone() method stated that the input is treated as JSON we can use the JSON.parse(JSON.stringify()) combo to create a deep clone of the document.