diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f744573 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: https://gumroad.com/l/hGYGh diff --git a/lib/simplebus.js b/lib/simplebus.js index 8d835c4..d8f6653 100644 --- a/lib/simplebus.js +++ b/lib/simplebus.js @@ -10,7 +10,7 @@ function Bus(size) this.post = function(message) { messages.push(message); - if (size && messages.length > size) + if (size != false && messages.length >= size) messages.shift(); subscriptions.forEach(function(sub) { @@ -150,4 +150,4 @@ exports.createBus = function(size) { return new Bus(size); } exports.createServer = function (bus, port, host) { return new Server(bus, port, host); } -exports.createClient = function (port, host) { return new Client(port, host); } \ No newline at end of file +exports.createClient = function (port, host) { return new Client(port, host); }