Fix infinite loop in example.

This commit is contained in:
nboyd%atg.com 2001-01-12 16:28:36 +00:00
parent f31989342e
commit 8ca97fa895

View File

@ -259,7 +259,9 @@ public class Matrix implements Scriptable {
public boolean hasInstance(Scriptable value) {
Scriptable proto = value.getPrototype();
while (proto != null) {
if (proto.equals(this)) return true;
if (proto.equals(this))
return true;
proto = proto.getPrototype();
}
return false;