1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Use indexOf instead of startsWith (#3758)

* Use indexOf instead of startsWith

This fixes an IE11 regression, see #3755

* Lint the code
This commit is contained in:
Maik Marschner 2018-02-16 16:05:57 +01:00 committed by Tim Neutkens
parent 523b61569b
commit 9fb8b93ed9

View file

@ -60,7 +60,7 @@ function unique () {
const metaCategories = {}
return (h) => {
if (h.key && h.key.startsWith('.$')) {
if (h.key && h.key.indexOf('.$') === 0) {
if (keys.has(h.key)) return false
keys.add(h.key)
}