Skip to content

Commit b97f051

Browse files
committed
Handle working alone scenario
1 parent c276c0f commit b97f051

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/pairing_matrix/server/public/matrix.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,13 @@ function PlayGround(selector) {
123123
};
124124

125125
this.mouseOver = function (id) {
126-
hideMatrix();
127126
var connectedPairs = _.unique(_.flatten(playground.getAllPairsContaining(id)));
128-
console.log(connectedPairs);
127+
hideMatrix();
128+
if (connectedPairs.length == 0) {
129+
showPlayer(id);
130+
return;
131+
}
132+
129133
connectedPairs.forEach(function (pair) {
130134
showPlayer(pair);
131135
});

0 commit comments

Comments
 (0)