sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r921474 - /sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp
Date Wed, 10 Mar 2010 17:43:56 GMT
Author: cziegeler
Date: Wed Mar 10 17:43:56 2010
New Revision: 921474

URL: http://svn.apache.org/viewvc?rev=921474&view=rev
Log:
Fix get star test. currentNode might be undefined

Modified:
    sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp

Modified: sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp?rev=921474&r1=921473&r2=921474&view=diff
==============================================================================
--- sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp
(original)
+++ sling/trunk/contrib/launchpad/testing/src/test/resources/integration-test/rendering-test.esp
Wed Mar 10 17:43:56 2010
@@ -1,3 +1,4 @@
+<%
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,12 +17,17 @@
  * specific language governing permissions and limitations
  * under the License.
  */
- 
+
+var text = "undefined";
+if ( typeof currentNode != "undefined") {
+  text = currentNode.text;
+}
+ %>
 <%-- used by ScriptedRenderingTest --%>
 <html>
 	<body>
 		ESP template
-		<p><%= currentNode.text %></p>
+		<p><%= text %></p>
 	
 		<!-- test SLING-142, compact syntax -->
 		<div class="SLING-142" id="${'2' + '2'}"/>



Mime
View raw message