File tree Expand file tree Collapse file tree 1 file changed +28
-7
lines changed
Expand file tree Collapse file tree 1 file changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,10 @@ var app = new Vue({
138138 this . unbind = bind ( subscription , todos , updateTodos ) ;
139139 } . bind ( this )
140140 )
141- . catch ( alert ) ;
141+ . catch ( error => {
142+ console . error ( error ) ;
143+ alert ( error . message ) ;
144+ } ) ;
142145 } ,
143146
144147 login : function ( ) {
@@ -149,7 +152,10 @@ var app = new Vue({
149152 this . username = this . password = '' ;
150153 } . bind ( this )
151154 )
152- . catch ( alert ) ;
155+ . catch ( error => {
156+ console . error ( error ) ;
157+ alert ( error . message ) ;
158+ } ) ;
153159 } ,
154160
155161 signup : function ( ) {
@@ -160,7 +166,10 @@ var app = new Vue({
160166 this . username = this . password = '' ;
161167 } . bind ( this )
162168 )
163- . catch ( alert ) ;
169+ . catch ( error => {
170+ console . error ( error ) ;
171+ alert ( error . message ) ;
172+ } ) ;
164173 } ,
165174
166175 logout : function ( ) {
@@ -199,7 +208,10 @@ var app = new Vue({
199208 this . todos . push ( todo . toJSON ( ) ) ;
200209 } . bind ( this )
201210 )
202- . catch ( alert ) ;
211+ . catch ( error => {
212+ console . error ( error ) ;
213+ alert ( error . message ) ;
214+ } ) ;
203215 this . newTodo = '' ;
204216 } ,
205217
@@ -211,7 +223,10 @@ var app = new Vue({
211223 this . todos . splice ( this . todos . indexOf ( todo ) , 1 ) ;
212224 } . bind ( this )
213225 )
214- . catch ( alert ) ;
226+ . catch ( error => {
227+ console . error ( error ) ;
228+ alert ( error . message ) ;
229+ } ) ;
215230 } ,
216231
217232 editTodo : function ( todo ) {
@@ -227,7 +242,10 @@ var app = new Vue({
227242 content : todo . content ,
228243 done : todo . done ,
229244 } )
230- . catch ( alert ) ;
245+ . catch ( error => {
246+ console . error ( error ) ;
247+ alert ( error . message ) ;
248+ } ) ;
231249 if ( ! todo . content ) {
232250 this . removeTodo ( todo ) ;
233251 }
@@ -249,7 +267,10 @@ var app = new Vue({
249267 this . todos = filters . active ( this . todos ) ;
250268 } . bind ( this )
251269 )
252- . catch ( alert ) ;
270+ . catch ( error => {
271+ console . error ( error ) ;
272+ alert ( error . message ) ;
273+ } ) ;
253274 } ,
254275 } ,
255276
You can’t perform that action at this time.
0 commit comments