Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Watched array pushes to parent object still a bug #56

Open
nickimproove opened this issue Sep 3, 2013 · 2 comments
Open

Watched array pushes to parent object still a bug #56

nickimproove opened this issue Sep 3, 2013 · 2 comments

Comments

@nickimproove
Copy link

This issue is still a bug link: #19

var apple = 
{
    manufacturer:"macintosh",
    color: "red",
    types: 
    {
        machines: 
        [
            'mac pro',
            'imac'
        ]
    }
}

watch(apple, "types", function()
{
    console.log(this);
});

apple.types.machines.push('ipad');

console.log(this) outputs result you see bellow:

{
    mac pro,imac,ipad:undefined,
    machines: 
    [
        "mac pro",  
        "imac",
        "ipad"
    ]
}
@melanke
Copy link
Owner

melanke commented Sep 11, 2013

Sorry, I dont get your issue.
I think this is working: http://jsfiddle.net/WDgye/

@nickimproove
Copy link
Author

Hello,

Se my screendump bellow if you push to machines array there will also be a object pushed to it´s parent "types".

Thats must be a bug right?

Im using firefox for this test were you using webkit (chrome) browser for your test ?

firefox

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants