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.

Numeric - TypeError: initialValue.split is not a function

See original GitHub issue

See my code

This code worked in previous version. but not now (3.3.4)

Inputmask.format(62.91, { alias: 'numeric' });

The output

Uncaught TypeError: initialValue.split is not a function at Object.onBeforeMask (inputmask:2617) at Inputmask.maskScope (inputmask:1136) at Inputmask.format (inputmask:1350) at Function.Inputmask.format (inputmask:1508) at <anonymous>:1:11

What can i do ?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
RobinHerbotscommented, Jan 3, 2017

@penihel ,

Probably in the numeric extension. Onbeforemask => initialValue.split replace with initialValue.toString().split

0reactions
dlkulpcommented, Apr 11, 2019

I have a similar issue with a mask of “9{+}[.9{+}]” on Chrome Version 73.0.3683.103 or Firefox 66.0.2 (though it seems to be fine on Edge for whatever reason).

(From Chrome)

jquery.inputmask.bundle.js:2102 Uncaught (in promise) TypeError: value.split is not a function
    at HTMLInputElement.setValueEvent (jquery.inputmask.bundle.js:2102)
    at HTMLInputElement.ev (jquery.inputmask.bundle.js:1836)
    at HTMLInputElement.dispatch (jquery-3.3.1.js:5184)
    at HTMLInputElement.elemData.handle (jquery-3.3.1.js:4992)
    at Object.trigger (jquery-3.3.1.js:8250)
    at HTMLInputElement.<anonymous> (jquery-3.3.1.js:8328)
    at Function.each (jquery-3.3.1.js:354)
    at jQuery.fn.init.each (jquery-3.3.1.js:189)
    at jQuery.fn.init.trigger (jquery-3.3.1.js:8327)
    at HTMLInputElement.setter (jquery.inputmask.bundle.js:2673)
Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: split is not a function in JavaScript | bobbyhadz
The "split is not a function" error occurs when we call the split() method on a value that is not of type string....
Read more >
Javascript Uncaught TypeError : .split is not a function
Uncaught TypeError (intermediate value).split is not a function. Anyone knows on how to solve this problem? I've tried so many ways.
Read more >
parseFloat() - JavaScript - MDN Web Docs
The parseFloat function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or...
Read more >
TypeError: split is not a function in JavaScript - Java2Blog
TypeError : .split is not a function occurs when we call split() function on object which is not an string. split() function can...
Read more >
Function object, NFE - The Modern JavaScript Tutorial
If the function does not provide one, then in an assignment it is figured ... that returns the number of function parameters, for...
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