Fix name/log var corruption

This commit is contained in:
Nick Farina
2015-08-04 16:21:06 -07:00
parent c756ea9456
commit f7f953b8d1

7
app.js
View File

@@ -100,7 +100,8 @@ function loadPlatforms() {
var platformInstance = new platformConstructor(log, platformConfig);
// query for devices
// wrap name and log in a closure so they don't change in the callback
function getAccessories(name, log) {
asyncCalls++;
platformInstance.accessories(function(foundAccessories){
asyncCalls--;
@@ -129,6 +130,10 @@ function loadPlatforms() {
publish();
})
}
// query for devices
getAccessories(name, log);
}
}
function publish() {