Changeset 4783 in webkit for trunk/JavaScriptCore/kjs/string_object.cpp
- Timestamp:
- Aug 7, 2003, 12:10:01 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/string_object.cpp
r3373 r4783 273 273 if (imp) 274 274 imp->put(exec, "lastIndex", Number(lastIndex), DontDelete|DontEnum); 275 result = exec->interpreter()->builtinArray().construct(exec, list); 275 if (list.isEmpty()) { 276 // if there are no matches at all, it's important to return 277 // Null instead of an empty array, because this matches 278 // other browsers and because Null is a false value. 279 result = Null(); 280 } else { 281 result = exec->interpreter()->builtinArray().construct(exec, list); 282 } 276 283 } 277 284 }
Note:
See TracChangeset
for help on using the changeset viewer.