Always return empty array for propery enumerations on HopObject prototypes.
This is to stop prototype properties from showing up in HopObject proprerty enumerations. HopObject.getAllIds() can be used to get a prototypes properties.
This commit is contained in:
parent
5cc104466c
commit
e3d8976274
1 changed files with 4 additions and 1 deletions
|
@ -910,7 +910,10 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
|
|||
*/
|
||||
public Object[] getIds() {
|
||||
if (node == null) {
|
||||
return super.getIds();
|
||||
// HopObject prototypes always return an empty array in order not to
|
||||
// pollute actual HopObjects properties. Call getAllIds() to get
|
||||
// a list of properties from a HopObject prototype.
|
||||
return new Object[0];
|
||||
}
|
||||
|
||||
checkNode();
|
||||
|
|
Loading…
Add table
Reference in a new issue