From 6a75c4623a28e4433a5f8a4263bd25dea8705c18 Mon Sep 17 00:00:00 2001
From: Astrid Elocson <aelocson@gmail.com>
Date: Sun, 11 Jan 2015 18:31:53 +0000
Subject: [PATCH] Fix #1357: Railroad plugin under Node.js

---
 plugins/tiddlywiki/railroad/wrapper.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/tiddlywiki/railroad/wrapper.js b/plugins/tiddlywiki/railroad/wrapper.js
index cb1b9a0bd..a4e8c7032 100644
--- a/plugins/tiddlywiki/railroad/wrapper.js
+++ b/plugins/tiddlywiki/railroad/wrapper.js
@@ -74,7 +74,7 @@ RailroadWidget.prototype.renderSvg = function(parser,div) {
 
 RailroadWidget.prototype.patchLinks = function(node) {
 	var self = this;
-	if(node.hasChildNodes()) {
+	if(!$tw.node && node.hasChildNodes()) {
 		var children = node.childNodes;
 		for(var i=0; i<children.length; i++) {
 			var child = children[i];