File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -114,12 +114,15 @@ class LinkList extends Component {
114114 }
115115 }
116116 ` ,
117- updateQuery : ( previous , { subscriptionData } ) => {
118- const newAllLinks = [ subscriptionData . data . newLink . node , ...previous . feed . links ]
117+ updateQuery : ( previous , { subscriptionData } ) => {
118+ const newAllLinks = [
119+ subscriptionData . data . newLink . node ,
120+ ...previous . feed . links ,
121+ ]
119122 const result = {
120123 ...previous ,
121124 feed : {
122- links : newAllLinks
125+ links : newAllLinks ,
123126 } ,
124127 }
125128 return result
@@ -157,14 +160,6 @@ class LinkList extends Component {
157160 }
158161 }
159162 ` ,
160- updateQuery : ( previous , { subscriptionData } ) => {
161- const newAllLinks = previous . feed . links . slice ( )
162- const result = {
163- ...previous ,
164- allLinks : newAllLinks ,
165- }
166- return result
167- } ,
168163 } )
169164 }
170165}
You can’t perform that action at this time.
0 commit comments