@@ -105,8 +105,9 @@ Find things!:
105105``` js
106106mention .findChoices = function (match ) {
107107 // Matches items from search query
108- return [/* choices */ ]
109- .filter ( choice => ~ this .label (choice).indexOf (match[1 ]) );
108+ return [/* choices */ ].filter (function (choice ) {
109+ return ~ this .label (choice).indexOf (match[1 ]);
110+ });
110111}
111112```
112113
@@ -128,16 +129,21 @@ mention.findChoices = function(match) {
128129Hate redundancy? De-dupe that shiznizzle:
129130``` js
130131mention .findChoices = function (match , mentions ) {
131- return [ /* choices */ ]
132- .filter ( choice => ! mentions .some ( mention => mention .id === choice .id ) )
132+ return [ /* choices */ ].filter (function (choice ) {
133+ return ! mentions .some (function (mention ) {
134+ return mention .id === choice .id ;
135+ });
136+ });
133137};
134138```
135139
136140Use the awesome power of the internet:
137141``` js
138142mention .findChoices = function (match ) {
139143 return $http .get (' /users' , { params: { q: match[1 ] } })
140- .then ( response => response .data );
144+ .then (function (response ) {
145+ return response .data ;
146+ });
141147}
142148```
143149
@@ -146,7 +152,7 @@ Your servers are slow? Mama please.
146152mention .findChoices = function (match ) {
147153 mention .loading = true ;
148154 return $http .get (... )
149- .finally ( response => {
155+ .finally (function ( response ) {
150156 mention .loading = false ;
151157 });
152158}
0 commit comments