Skip to content

Commit

Permalink
feat: replace Array.prototype.includes() to core-js polyfill manually
Browse files Browse the repository at this point in the history
  • Loading branch information
yumetodo committed Nov 11, 2017
1 parent 9dacaa6 commit 4ef4a21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/kunai/code/cpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {ID} from './id'

import {Logger} from 'nagato'

const arrayIncludes = require("core-js/library/fn/array/includes")

class CPP {
constructor(log, id, buf, hints) {
Expand All @@ -27,7 +28,7 @@ class CPP {

if (hints.headers) {
for (const h of hints.headers) {
if (!this.headers.includes(h)) {
if (!arrayIncludes(this.headers, h)) {
this.log.warn(`already found header '${h}' in meta tag, but it was not written in this code snippet`)
this.prepend_header(h)
this.headers.push(h)
Expand Down

0 comments on commit 4ef4a21

Please sign in to comment.