coins: minor.

This commit is contained in:
Christopher Jeffrey 2016-12-10 23:15:03 -08:00
parent c681b75b7b
commit 931a2a9398
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -228,13 +228,11 @@ Coins.prototype.spend = function spend(index) {
*/
Coins.prototype.remove = function remove(index) {
var entry;
var entry = this.get(index);
if (index >= this.outputs.length)
if (!entry)
return false;
entry = this.outputs[index];
this.outputs[index] = null;
this.cleanup();