Codeinwp / Ideal-Image-Slider-JS

Quite simply the ideal Image Slider in vanilla JS.
http://idealimageslider.com
GNU General Public License v3.0
1.57k stars 160 forks source link

deepExtend typo #34

Closed mihai-vlc closed 9 years ago

mihai-vlc commented 9 years ago

Hi, I was looking over the code and I noticed a typo deepExtend is not defined here

    var _deepExtend = function(out) {
        out = out || {};
        for(var i = 1; i < arguments.length; i++){
            var obj = arguments[i];
            if(!obj)
                continue;
            for(var key in obj){
                if(obj.hasOwnProperty(key)){
                    if(typeof obj[key] === 'object')
                        deepExtend(out[key], obj[key]); // should be _deepExtend
                    else
                        out[key] = obj[key];
                }
            }
        }
        return out;
    };
coooolchan commented 9 years ago

I think you dont describe it clearly. for example: var input = { a: 1, b: 2, c: { d: 'hello', e: 'world' }, d: 4 }; _deepExtend(out, input); ==>{a: 1, b: 2, d: 4, e: "world"} should use _deepExtend(out, obj[key]); or _deepExtend(out, input); ==>{a: 1, b: 2, c: { d: "hello", e: "world"}, d: 4} should use out[key] = _deepExtend({}, obj[key]);

bumbu commented 9 years ago

If this is a typo then why it works on demo page? Maybe it is defined somewhere?

mihai-vlc commented 9 years ago

this is still open ?

gilbitron commented 9 years ago

Fixed by #69

mihai-vlc commented 9 years ago

:+1: :smiley: