1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/javascripts/fake-hogan.js
Kevin Heis 685e7a3655 Remove unsafe eval (#16704)
* Remove unsafe eval

* Actually, we're not using this anyways

* Reset package-lock, I have no idea why this keeps changing

* Update csp.js

* Update server.js
2020-12-02 16:19:14 +00:00

16 lines
369 B
JavaScript

// This module overrides "Hogan" that instantsearch.js uses
// Hogan uses `new Function`,
// so we can't use it with our content security policy.
// Turns out, we use all our own templates anyway,
// so we just have to shim out Hogan so it doesn't error!
export default {
compile (template) {
return {
render (data) {
return ''
}
}
}
}