From d2a1a8ebe5eece347473af308470da9303b076f6 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 30 Jan 2021 16:11:30 +0100 Subject: [PATCH] Use local reference to Network in constructor To allow customizing the bc module in compatibility wrappers, use the local reference instead of a global one. This means a wrapper module could set `BaseControl.Network` to a different default. --- bc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bc.lua b/bc.lua index bd4804501ad4..79202d64ec6d 100644 --- a/bc.lua +++ b/bc.lua @@ -139,7 +139,7 @@ function BaseControl:new(network) listeners = {}, live = false, - network = network or Network:new(), + network = network or BaseControl.Network:new(), } setmetatable(self, {__index=BaseControl, __call=BaseControl.new})