Merge pull request #39 from AAMasters/develop
If a file is missing, wont halt initialization
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -81,7 +81,7 @@
|
||||
if (bot.products !== undefined) {
|
||||
for (let k = 0; k < bot.products.length; k++) {
|
||||
let product = bot.products[k]
|
||||
|
||||
if (product.shareWith !== 'Public' && devTeam.codeName !== userTeam.slug) { continue }
|
||||
/* Now we create Product objects */
|
||||
|
||||
let productCard = newProductCard()
|
||||
|
||||
+3
-3
@@ -186,7 +186,8 @@ function newProductStorage (pName) {
|
||||
|
||||
let event = {
|
||||
totalValue: pCaller.getExpectedFiles(),
|
||||
currentValue: pCaller.getFilesLoaded()
|
||||
currentValue: pCaller.getFilesLoaded(),
|
||||
filesNotLoaded: pCaller.getFilesNotLoaded()
|
||||
}
|
||||
|
||||
thisObject.eventHandler.raiseEvent('Market File Loaded', event)
|
||||
@@ -194,7 +195,7 @@ function newProductStorage (pName) {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initialize -> onMarketFileReady -> event.currentValue = ' + event.currentValue) }
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initialize -> onMarketFileReady -> event.totalValue = ' + event.totalValue) }
|
||||
|
||||
if (event.currentValue === event.totalValue) {
|
||||
if (event.currentValue + event.filesNotLoaded === event.totalValue) {
|
||||
dataSetsLoaded++
|
||||
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initialize -> onMarketFileReady -> dataSetsLoaded = ' + dataSetsLoaded) }
|
||||
@@ -424,4 +425,3 @@ function newProductStorage (pName) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user