From 5953911dcacf473019fa782d8048caea27cf7de2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 22 Dec 2020 05:17:39 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- Array.js | 2 +- containers.js | 4 +++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Array.js b/Array.js index a7566e5..d69d837 100644 --- a/Array.js +++ b/Array.js @@ -260,7 +260,7 @@ object.Mixin('ArrayProtoMixin', 'soft', { : this[0]}, last: function(value){ return arguments.length > 0 ? - ((this[this.length - 1 || 0] = value), this) + ((this[Math.max(this.length - 1, 0)] = value), this) : this[this.length - 1]}, // Roll left/right (in-place)... diff --git a/containers.js b/containers.js index 1ad7cae..04b11c6 100644 --- a/containers.js +++ b/containers.js @@ -16,7 +16,8 @@ var object = require('ig-object') /*********************************************************************/ var UniqueKeyMap = -module.UniqueKeyMap = object.Constructor('UniqueKeyMap', Map, { +module.UniqueKeyMap = +object.Constructor('UniqueKeyMap', Map, { // Format: // Map([ @@ -175,5 +176,6 @@ module.UniqueKeyMap = object.Constructor('UniqueKeyMap', Map, { + /********************************************************************** * vim:set ts=4 sw=4 : */ return module }) diff --git a/package.json b/package.json index 5f72631..5356dea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-types", - "version": "6.0.5", + "version": "6.0.6", "description": "Generic JavaScript types and type extensions...", "main": "main.js", "scripts": {