changeset 112:38d6a4db35d7 v2

fixed Promise.Error handler
author cin
date Wed, 19 Nov 2014 13:34:09 +0300
parents 1a8426e6e895
children 468d156e434e 3fbc6eb93eb1
files Implab/Promise.cs
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Implab/Promise.cs	Sun Nov 16 02:49:12 2014 +0300
+++ b/Implab/Promise.cs	Wed Nov 19 13:34:09 2014 +0300
@@ -178,7 +178,7 @@
 
         public Promise(IPromise parent) {
             if (parent != null)
-                AddMappers<T>(
+                AddHandler(
                     null,
                     null,
                     () => {
@@ -335,7 +335,7 @@
             var medium = new Promise<T>(this);
 
             AddMappers(
-                null,
+                x => x,
                 e => {
                     error(e);
                     return default(T);
@@ -362,7 +362,7 @@
 
             var medium = new Promise<T>(this);
 
-            AddMappers(null, handler, null, medium, true);
+            AddMappers(x => x, handler, null, medium, true);
 
             return medium;
         }