
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Minor
|
| Fixed in Change#: |
6,151
|
| Runtime: |
N/A
|
| Flags: |
External
|
| Fix in hand: |
True
|
|
If you don't test against "null", you'll get the first subview resp. 0.
This will return the first subview caused by misbehaviour of "getItemIndexByData(..)":
[code]
<method name="getItemByData" args="data">
<![CDATA[
return data ? getItemByIndex( this.getItemIndexByData( data ) ) : null;
]]>
</method>
[/code]
This will return 0 for "null"-data, but it should return "null":
[code]
<method name="getItemIndexByData" args="data">
<![CDATA[
if (data) {
var svs = immediateparent.subviews;
if (svs[0].cloneManager) {
...
}
else if( svs[0].datapath.p == data )//<-- this is the root for this issue, because "svs[0].datapath.p" may be null if there is no data..
...
}
}
return null;
]]>
</method>
[/code]
|
|
Description
|
If you don't test against "null", you'll get the first subview resp. 0.
This will return the first subview caused by misbehaviour of "getItemIndexByData(..)":
[code]
<method name="getItemByData" args="data">
<![CDATA[
return data ? getItemByIndex( this.getItemIndexByData( data ) ) : null;
]]>
</method>
[/code]
This will return 0 for "null"-data, but it should return "null":
[code]
<method name="getItemIndexByData" args="data">
<![CDATA[
if (data) {
var svs = immediateparent.subviews;
if (svs[0].cloneManager) {
...
}
else if( svs[0].datapath.p == data )//<-- this is the root for this issue, because "svs[0].datapath.p" may be null if there is no data..
...
}
}
return null;
]]>
</method>
[/code] |
Show » |
| There are no comments yet on this issue.
|
|