Skip to content
This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Commit 5cf3e10

Browse files
author
Hugo Vieilledent
committed
fix unable to add new favorite because one listed no longer exists
1 parent 7d5fc23 commit 5cf3e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database.rules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
},
136136
"favoriteChannels": {
137137
"$favoriteChannel": {
138-
".validate": "root.child('channels').child($favoriteChannel).exists()"
138+
".validate": "root.child('channels').child($favoriteChannel).exists() || root.child('channels').child($channelID).child('favoriteChannels').child($favoriteChannel).exists() && !newData.child($favoriteChannel).exists()"
139139
}
140140
},
141141
"image": {

0 commit comments

Comments
 (0)