Skip to content

No notification about array element change #10

Open
@proto-n

Description

@proto-n

Hey!

I've discovered a bug - the library currently doesn't notice when you change an element of an array.

Test case:

const Introspected = require('introspected')

let arr = [{},2,3]
let changes = 0
let arr_intro = Introspected(arr, (value, path) => {
	changes += 1
})

console.log(changes)
arr_intro[0] = 3
console.log(changes)
arr_intro[2] = 4
console.log(changes)

Expected output:

1
2
3

Actual output:

1
1
1

Node version tested: v9.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions