minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-11-22 22:44:47 +03:00
parent 41735e6380
commit 5654019be5
3 changed files with 4 additions and 4 deletions

View File

@ -1273,7 +1273,7 @@ Constructor('Mixin', {
// This can be:
// 'proto' - mix data into prototype chain (default)
// 'flat' - use mixinFlat(..) to copy data
// 'softflat' - like 'flat' but uses mixinFlat('soft', ..)
// 'soft' - like 'flat' but uses mixinFlat('soft', ..)
mode: 'proto',
// base API...
@ -1289,7 +1289,7 @@ Constructor('Mixin', {
&& ([_, mode, target] = arguments)
return mode == 'flat' ?
this.constructor.mixinFlat(target, this.data)
: mode == 'softflat' ?
: mode == 'soft' ?
this.constructor.mixinFlat('soft', target, this.data)
: this.constructor.mixin(target, this.data) },

View File

@ -1,6 +1,6 @@
{
"name": "ig-object",
"version": "5.4.10",
"version": "5.4.11",
"description": "",
"main": "object.js",
"scripts": {

View File

@ -760,7 +760,7 @@ var cases = test.Cases({
assert('b' in x == false, 'post-mixout content gone')
assert('c' in x == false, 'post-mixout content gone')
var z = assert(C('softflat', {a:'zzz'}), `C("flat", {})`)
var z = assert(C('soft', {a:'zzz'}), `C("flat", {})`)
assert(z.a == 'zzz', 'no overwrite')
assert(z.b == 'bbb', 'mixin content from C')