After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687153 - Format: don't call toString() blindly
Format: don't call toString() blindly
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-29 21:30 UTC by Giovanni Campagna
Modified: 2012-10-29 21:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Format: don't call toString() blindly (846 bytes, patch)
2012-10-29 21:30 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-10-29 21:30:46 UTC
Instead, use String() as a function. It fixes passing null or
undefined to format().
Comment 1 Giovanni Campagna 2012-10-29 21:30:48 UTC
Created attachment 227596 [details] [review]
Format: don't call toString() blindly
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-10-29 21:44:42 UTC
Review of attachment 227596 [details] [review]:

I would also accept ('' + args[i++])
Comment 3 Giovanni Campagna 2012-10-29 21:48:49 UTC
Attachment 227596 [details] pushed as 6aaa1f4 - Format: don't call toString() blindly

('' + args[i++]) is just... ugh!