#459 closed defect (fixed)
Error in dojo.string.has(...)
Reported by: | Owned by: | alex | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
There is a coding error in the dojo.string.has comparison function. Misplaced brackets mean that the function always returns true, even if none of the testcases are contained in the main string.
Diff:
--- extras.js.old Mon Feb 20 20:31:08 2006 +++ extras.js.new Mon Feb 20 20:30:59 2006 @@ -163,7 +163,7 @@ */ dojo.string.has = function(str /* , ... */) { for(var i = 1; i < arguments.length; i++) { - if(str.indexOf(arguments[i] > -1)) { + if(str.indexOf(arguments[i]) > -1) { return true; } }
Change History (3)
comment:1 Changed 15 years ago by
Milestone: | → 0.3release |
---|---|
Owner: | changed from anonymous to alex |
Status: | new → assigned |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
fixed in [3121]. Thanks for reporting this.