Bug 480509: Workaround for no-undef-expression validator tests
diff --git a/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js b/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js
index 8d0c471..620316c 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js
@@ -1424,7 +1424,8 @@
 								try {
 									var expr = tern.findQueryExpr(tern.file, query);
 									var type = tern.findExprType(query, tern.file, expr);
-									if (type && type.origin){
+									// TODO Tern 18 change results in the origin being set in the proto chain for maybeProps, we use hasOwnProperty to exclude them
+									if (type && type.origin && hasOwnProperty('origin')){
 										foundType = true;
 									}
 								} catch(e) {
@@ -1459,6 +1460,9 @@
         	                						name = type.originNode.name;
     	                						}
         	                					var origin = type.types[0].origin;
+        	                					if (!origin && type.origin){
+        	                						origin = type.origin;
+        	                					}
             	                				if (type.types.length === 1 && name && origin){
             	                					if (/\./.test(origin)){
         	                							var originNode = type.types[0].originNode ? type.types[0].originNode : type.originNode;