From 818d0d1e442acd5fafe8dc66bbba75f8867de276 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 13 May 2021 19:19:08 -0700 Subject: [PATCH] Fix context.options.context --- lib/src/importer/node/implementation.dart | 8 ++++++-- lib/src/node.dart | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/src/importer/node/implementation.dart b/lib/src/importer/node/implementation.dart index 9af892575..823ec5914 100644 --- a/lib/src/importer/node/implementation.dart +++ b/lib/src/importer/node/implementation.dart @@ -211,6 +211,10 @@ class NodeImporter { } /// Returns the [RenderContext] in which to invoke importers. - RenderContext _renderContext(bool fromImport) => RenderContext( - options: _options as RenderContextOptions, fromImport: fromImport); + RenderContext _renderContext(bool fromImport) { + var context = RenderContext( + options: _options as RenderContextOptions, fromImport: fromImport); + context.options.context = context; + return context; + } } diff --git a/lib/src/node.dart b/lib/src/node.dart index ca07b1f7a..5a430dac2 100644 --- a/lib/src/node.dart +++ b/lib/src/node.dart @@ -205,6 +205,7 @@ List _parseFunctions(RenderOptions options, DateTime start, } var context = RenderContext(options: _contextOptions(options, start)); + context.options.context = context; var fiber = options.fiber; if (fiber != null) {