()
| 95 | } |
| 96 | |
| 97 | children() { |
| 98 | this.database |
| 99 | .ref('/posts') |
| 100 | .once('value') |
| 101 | .then((res) => { |
| 102 | let count = 0; |
| 103 | res.forEach((snapshot) => { |
| 104 | const val = snapshot.val(); |
| 105 | console.log('val', 'index', count, val); |
| 106 | if (val.likes === 3) { |
| 107 | return true; |
| 108 | } |
| 109 | count++; |
| 110 | }); |
| 111 | }); |
| 112 | } |
| 113 | |
| 114 | transaction() { |
| 115 | this.database |