You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2021/12/13 14:30:58 UTC

[beam] branch master updated: [BEAM-13423]: fix frontend failure if no examples

This is an automated email from the ASF dual-hosted git repository.

pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 290fc87  [BEAM-13423]: fix frontend failure if no examples
     new ad28b00  Merge pull request #16193 from [BEAM-13423] [Bugiix] [Playground]: fix frontend failure if no examples
290fc87 is described below

commit 290fc87b59be43d140107bc1383e66a9abb54e0e
Author: Aydar Farrakhov <st...@gmail.com>
AuthorDate: Fri Dec 10 11:53:47 2021 +0300

    [BEAM-13423]: fix frontend failure if no examples
---
 .../pages/playground/components/playground_page_providers.dart |  3 +++
 playground/frontend/pubspec.lock                               | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/playground/frontend/lib/pages/playground/components/playground_page_providers.dart b/playground/frontend/lib/pages/playground/components/playground_page_providers.dart
index 66ae46d..20dfbc5 100644
--- a/playground/frontend/lib/pages/playground/components/playground_page_providers.dart
+++ b/playground/frontend/lib/pages/playground/components/playground_page_providers.dart
@@ -89,6 +89,9 @@ class PlaygroundPageProviders extends StatelessWidget {
         .expand((sdkCategory) => sdkCategory.map((e) => e.examples))
         .expand((element) => element)
         .toList();
+    if (allExamples?.isEmpty ?? true) {
+      return null;
+    }
     final defaultExample = exampleState.defaultExamplesMap![playground.sdk]!;
     return allExamples?.firstWhere(
       (example) => example.path == examplePath,
diff --git a/playground/frontend/pubspec.lock b/playground/frontend/pubspec.lock
index c883ed9..5d9ab7a 100644
--- a/playground/frontend/pubspec.lock
+++ b/playground/frontend/pubspec.lock
@@ -35,7 +35,7 @@ packages:
       name: async
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.8.1"
+    version: "2.8.2"
   boolean_selector:
     dependency: transitive
     description:
@@ -105,7 +105,7 @@ packages:
       name: characters
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.2.0"
   charcode:
     dependency: transitive
     description:
@@ -372,7 +372,7 @@ packages:
       name: matcher
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.12.10"
+    version: "0.12.11"
   meta:
     dependency: transitive
     description:
@@ -601,7 +601,7 @@ packages:
       name: test_api
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.4.2"
+    version: "0.4.3"
   timing:
     dependency: transitive
     description:
@@ -664,7 +664,7 @@ packages:
       name: vector_math
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.1.0"
+    version: "2.1.1"
   watcher:
     dependency: transitive
     description: