mirror of
https://github.com/mtan93/homebridge.git
synced 2026-05-12 14:26:05 +01:00
Fix name/log var corruption
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user