Fix bug when checking for null

This commit is contained in:
danielyxie
2017-10-25 16:11:53 -05:00
parent 4dc87af132
commit 7614c62507
3 changed files with 31 additions and 10 deletions
+3 -3
View File
@@ -36029,18 +36029,18 @@ function updateStockOrderList(stock) {
if (__WEBPACK_IMPORTED_MODULE_1__engine_js__["Engine"].currentPage !== __WEBPACK_IMPORTED_MODULE_1__engine_js__["Engine"].Page.StockMarket) {return;}
var tickerId = "stock-market-ticker-" + stock.symbol;
var orderList = document.getElementById(tickerId + "-order-list");
if (orderList === null) {
if (orderList == null) {
console.log("ERROR: Could not find order list for " + stock.symbol);
return;
}
var orderBook = StockMarket["Orders"];
if (orderBook === null) {
if (orderBook == null) {
console.log("ERROR: Could not find order book in stock market");
return;
}
var stockOrders = orderBook[stock.symbol];
if (stockOrders === null) {
if (stockOrders == null) {
console.log("ERROR: Could not find orders for: " + stock.symbol);
return;
}