1

Closed

Bug [Incorrect fallback handling]

description

This source works:

var text = '1234.1234.1234.1234';
print(text.split("."));

this works not:

var text = 1.0;
print(text.split("."));

The following code found inside JavaScript Mustache library (doesn't work with JInt) Mustache is used by variety of famous sites such as Twitter, LinkedIn, etc...
Closed Mar 18, 2012 at 10:37 PM by cin
sample from Google Chrome console:

var text = 1.0; text.split(".");
TypeError: Object 1 has no method 'split'

comments

cin wrote Dec 21, 2011 at 8:14 PM

text variable in the second example is a number and doesn't have 'split' method