From 6f63e6a390aa605974a45f3258b7f636824e5595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A3o=20J=C3=BAnior?= Date: Mon, 1 Aug 2016 18:13:24 -0300 Subject: [PATCH] docs(server-communication): Resolve todo (#1993) * use latest version of http_in_memory_web_api * remove todo and drop the ?? body term --- .../server-communication/dart/lib/toh/hero_service.dart | 4 +--- public/docs/_examples/server-communication/dart/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart b/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart index 5da269fff7..dd16fe70cd 100644 --- a/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart +++ b/public/docs/_examples/server-communication/dart/lib/toh/hero_service.dart @@ -50,9 +50,7 @@ class HeroService { // #docregion extract-data dynamic _extractData(Response res) { var body = JSON.decode(res.body); - // TODO: https://github.com/adaojunior/http-in-memory-web-api/issues/1 - // Once #1 is fixed, drop the `?? body` term: - return body['data'] ?? body; + return body['data']; } // #enddocregion extract-data // #docregion error-handling diff --git a/public/docs/_examples/server-communication/dart/pubspec.yaml b/public/docs/_examples/server-communication/dart/pubspec.yaml index 217cb4edcc..3d8e06cbe0 100644 --- a/public/docs/_examples/server-communication/dart/pubspec.yaml +++ b/public/docs/_examples/server-communication/dart/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: http: ^0.11.3+3 jsonpadding: ^0.1.0 stream_transformers: ^0.3.0+3 - http_in_memory_web_api: ^0.0.1 + http_in_memory_web_api: ^0.2.0 # #docregion transformers transformers: - angular2: