question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Radio button throws "Uncaught TypeError: this.checked.includes is not a function"

See original GitHub issue

I tried (https://codepen.io/WoJWoJ/pen/YQLqjG) the simplest radio button (includes per the documentation):

<div id="root">
  <b-form-checkbox v-model="selected">something</b-form-checkbox>
  <div>
    The checkbox is selected: {{selected}}
  </div>
</div>
new Vue ({
  el: "#root",
  data: {
    selected: true
  }
})

The output is

something
The checkbox is selected: {{selected}}

and the Chrome DevTools show

vue.min.js:6 Uncaught TypeError: this.checked.includes is not a function
    at a.isChecked (form-checkbox.vue:43)
    at no.get (vue.min.js:7)
    at no.evaluate (vue.min.js:7)
    at a.isChecked (vue.min.js:6)
    at a.render (form-checkbox.vue:24)
    at a.n._render (vue.min.js:6)
    at a.<anonymous> (vue.min.js:6)
    at no.get (vue.min.js:7)
    at new no (vue.min.js:7)
    at a.e._mount (vue.min.js:6)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
tmorehousecommented, Jul 4, 2017

OK, I think I have found the issue.

1reaction
tmorehousecommented, Jul 4, 2017

A current quick workaround is to use the babel polyfil on the client.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doing something if radio button is not checked with js [closed]
(1) You have multiple elements with the same id which is invalid HTML. Additionally, this begs the question of which element you intend...
Read more >
JavaScript: Uncaught TypeError: n is not a function
This error occurs if you try to execute a function that is not initialized or is not initialized correctly. This means that the...
Read more >
.prop() | jQuery API Documentation
The .prop() method gets the property value for only the first element in the matched set. It returns undefined for the value of...
Read more >
[Solved] TypeError: toLowerCase is not a function in JavaScript
We got this error because str is not an string here. Convert object to string using toString() method and it will work fine....
Read more >
JavaScript: Calculate multiplication and division of two numbers
innerHTML = num1 * num2; } function divideBy() { num1 = document. ... doing multiplication or division using the Radio Buttons on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found