Remove hack comment as the hack is not being referenced
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
e6ad81502f
commit
2137bdcf25
@ -24,8 +24,6 @@ const
|
||||
borderImageWidth = (2 + 2/3) * tileImageWidth, /* 2.667 * .Tile.width */
|
||||
borderImageHeight = borderImageWidth * 0.29; /* 0.29 * .Border.height */
|
||||
|
||||
let hack = undefined;
|
||||
|
||||
const Board = () => {
|
||||
const { ws } = useContext(GlobalContext);
|
||||
const board = useRef();
|
||||
@ -144,10 +142,6 @@ const Board = () => {
|
||||
const refWsMessage = useRef(onWsMessage);
|
||||
useEffect(() => { refWsMessage.current = onWsMessage; });
|
||||
useEffect(() => {
|
||||
if (ws !== hack) {
|
||||
console.log(`board - setting out-of-scope hack`);
|
||||
hack = ws;
|
||||
}
|
||||
if (!ws) { return; }
|
||||
console.log('board - bind');
|
||||
const cbMessage = e => refWsMessage.current(e);
|
||||
@ -221,7 +215,6 @@ const Board = () => {
|
||||
} else {
|
||||
type = 'place-settlement';
|
||||
}
|
||||
if (!hack) { console.error(`board - onCornerClicked - ws is NULL`); return; }
|
||||
ws.send(JSON.stringify({
|
||||
type, index: corner.index
|
||||
}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user