Skip to content

Commit ce775f2

Browse files
committed
Bug fixes.
1 parent 3545200 commit ce775f2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

public/js/shared.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ App.Message.FIXTURES = [
3838
var store;
3939

4040
App.IndexRoute = Ember.Route.extend({
41-
"model" : function () {
41+
"init" : function() {
4242
store = this.store;
43-
return store.findAll("message");
43+
},
44+
"model" : function () {
45+
return store.find("message");
4446
}
4547
});
4648

@@ -49,6 +51,7 @@ App.IndexController = Ember.ArrayController.extend({
4951
"command" : null,
5052

5153
"actions" : {
54+
5255
"send" : function(key) {
5356

5457
if (key && key != 13) {
@@ -75,6 +78,7 @@ App.IndexController = Ember.ArrayController.extend({
7578

7679
this.set("command", null);
7780
}
81+
7882
}
7983

8084
});
@@ -89,6 +93,8 @@ App.IndexView = Em.View.extend({
8993

9094
try {
9195

96+
var id = 1;
97+
9298
if (!WebSocket) {
9399

94100
console.log("no websocket support");
@@ -109,7 +115,6 @@ try {
109115
socket.addEventListener("message", function (e) {
110116

111117
var data = JSON.parse(e.data);
112-
var id = 1;
113118

114119
switch (data.message.type) {
115120

0 commit comments

Comments
 (0)