Clarity on when deep path observers are called

13 views
Skip to first unread message

Michael Giuffrida

unread,
Sep 14, 2015, 3:29:21 PM9/14/15
to polymer-dev
When I observe a deep path of a property like so:
    observers: [
      'dataChanged(data.a.*')
    ]

Why is dataChanged called when data is set to {}? The change record is:
    { path: 'data.a',
      value: undefined,
      base: undefined }

Weirdly this only happens for the root property. If I observe dataChanged(data.a.b.*), then dataChange is called when data is set to {}, but not when data.a is set to {}.

What is the expected behavior here? Sample: http://jsbin.com/vibikewota/1/edit?html,console

Reply all
Reply to author
Forward
0 new messages