firebase-element icon indicating copy to clipboard operation
firebase-element copied to clipboard

firebase-collection: Modifying new locally-pushed items throws

Open kevinpschaaf opened this issue 10 years ago • 1 comments
trafficstars

Repro: http://jsbin.com/yuzixa/edit?html,console,output

  • Click 'Add'
  • Type in input
  • Note error
Uncaught Error: Firebase.child failed: First argument was an invalid path: "undefined". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"

This is due to the previous https://github.com/GoogleWebComponents/firebase-element/pull/60 fix which avoided the round-trip modification from the server, which is where the local __firebaseKey__ property is set. Simple fix is to set the new key in add after push, as its synchronously available there.

kevinpschaaf avatar Sep 04 '15 03:09 kevinpschaaf

/sub

GeoloeG-IsT avatar Dec 15 '15 13:12 GeoloeG-IsT