Skip to content

Commit e0ccbfd

Browse files
committed
Merge branch 'fix-critical-typos'
2 parents 90f2fbc + ca9b9f1 commit e0ccbfd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

inject-server.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Inject = {
3636
if (res)
3737
this.resPush(res, 'rawBodies', id, textOrFunc);
3838
else
39-
this.rawBodies[id] = text;
39+
this.rawBodies[id] = textOrFunc;
4040
},
4141
rawBodies: {},
4242

@@ -60,7 +60,7 @@ Inject = {
6060
for (id in objs) {
6161
obj = _.isFunction(objs[id]) ? objs[id](res) : objs[id];
6262
injectHtml += " <script id='" + id.replace("'", '&apos;')
63-
+ "' type='application/ejson'>" + EJSON.stringify(obj)
63+
+ "' type='application/ejson'>" + EJSON.stringify(obj)
6464
+ "</script>\n";
6565
}
6666

@@ -89,7 +89,7 @@ Inject = {
8989

9090
var injectHtml = '';
9191
for (id in heads)
92-
injectHtml = ' ' + heads[id] + '\n';
92+
injectHtml += ' ' + heads[id] + '\n';
9393

9494
return html.replace('<head>', '<head>\n' + injectHtml);
9595
},
@@ -100,7 +100,7 @@ Inject = {
100100

101101
var injectHtml = '';
102102
for (id in bodies)
103-
injectHtml = ' ' + bodies[id] + '\n';
103+
injectHtml += ' ' + bodies[id] + '\n';
104104

105105
return html.replace('<body>', '<body>\n' + injectHtml);
106106
},
@@ -136,7 +136,7 @@ var http = Npm.require('http');
136136
var originalWrite = http.OutgoingMessage.prototype.write;
137137
http.OutgoingMessage.prototype.write = function(chunk, encoding) {
138138
//prevent hijacking other http requests
139-
if(!this.iInjected &&
139+
if(!this.iInjected &&
140140
encoding === undefined && /^<!DOCTYPE html>/.test(chunk)) {
141141

142142
chunk = chunk.toString();

0 commit comments

Comments
 (0)