Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Uncaught TypeError: t.includes is not a function" #587

Closed
valexiev opened this issue Jun 30, 2017 · 11 comments
Closed

Error: "Uncaught TypeError: t.includes is not a function" #587

valexiev opened this issue Jun 30, 2017 · 11 comments
Assignees
Milestone

Comments

@valexiev
Copy link
Contributor

Thank you for the new release!

I've just updated bootstrap-vue to 0.17.0 and when I run the project an error is thrown:
"Uncaught TypeError: t.includes is not a function", pointing to bootstrap-vue.esm.js.

Does anybody else have the same error?
Any suggestion for fixing it?

@alexsasharegan
Copy link
Member

Did it give you any line # column #? This sounds like Array.prototype.includes is in the source, and is not transpiled. What browser vendor and version were you using to produce the error?

@alexsasharegan
Copy link
Member

I believe I have found all the uses of Array.prototype.includes in the source. Bublé (transpiler) is more opinionated than babel, and does not transpile this. PR coming shortly.

@alexsasharegan alexsasharegan self-assigned this Jun 30, 2017
@tmorehouse tmorehouse added this to the v0.17.2 milestone Jun 30, 2017
@alexsasharegan
Copy link
Member

@tmorehouse, you don't think this will make it into 0.17.1?

@tmorehouse
Copy link
Member

0.17.1 is already out 😄

@alexsasharegan
Copy link
Member

Haha, then I think you're right!

@alexsasharegan
Copy link
Member

Fix is in PR #589

@valexiev
Copy link
Contributor Author

valexiev commented Jun 30, 2017

Thanks for the prompt responses!

The browser is Chromium v46.

In the /dist/bootstrap-vue.esm.js this is the only occurrence of t.includes:

function omitLinkProps() {
	for (var t = [], e = arguments.length; e--;) t[e] = arguments[e];
	return Object.keys(props).reduce(function(e, n) {
		return t.includes(n) || (e[n] = props[n]), e
	}, {})
}

@alexsasharegan
Copy link
Member

Thanks for the update! Confirms my suspicions. Fix is merged and will appear in v0.17.2.

@tmorehouse
Copy link
Member

I'll close this issue.

v0.17.2 should be available soon.

@invergent
Copy link

invergent commented Jun 15, 2019

It's 2019, I am still getting the same error "TypeError: t.includes is not a function". Although, there is a bit of a twist to it. I only get the error when using a mobile device to access the app. @tmorehouse

@tmorehouse
Copy link
Member

@invergent what version are you using, and what browser? if using IE mobile (or other older browsers), make sure you are using the latest polyfils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants