Property 'includes' does not exist on type 'string[]'

后端 未结 3 656
忘掉有多难
忘掉有多难 2020-12-01 13:50

Getting the error

Property \'includes\' does not exist on type \'string[]\'

in node_modules/ng2-breadcrumb/app/components/bread

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 13:55

    If you don't want to change to es2016, just use arr.indexOf(valueToCheck) !== -1.

提交回复
热议问题