Skip to content

Commit

Permalink
add missing var to variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesnil committed Jan 22, 2010
1 parent 5a6b8d1 commit 4a0ebc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Stomp.frame = function(command, headers, body) {
headers: headers,
body: body,
toString: function() {
out = command + '\n';
var out = command + '\n';
if (headers) {
for (header in headers) {
if(headers.hasOwnProperty(header)) {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/frame.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module("Stomp Frame");

test("marshall a CONNECT frame", function() {
out = Stomp.marshall("CONNECT", {login: 'jmesnil', passcode: 'wombats'});
var out = Stomp.marshall("CONNECT", {login: 'jmesnil', passcode: 'wombats'});
equals(out, "CONNECT\nlogin: jmesnil\npasscode: wombats\n\n\0");
});

test("marshall a SEND frame", function() {
out = Stomp.marshall("SEND", {destination: '/queue/test'}, "hello, world!");
var out = Stomp.marshall("SEND", {destination: '/queue/test'}, "hello, world!");
equals(out, "SEND\ndestination: /queue/test\n\nhello, world!\0");
});

0 comments on commit 4a0ebc4

Please sign in to comment.