Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
i10416 committed Feb 28, 2022
1 parent fe4c0f4 commit 052383c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/src/lambda_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ class LambdaContext extends m.LambdaContext with HasSource,LambdaCtxWritable {
}

@internal
void checkClosedOrThrow() {
if (_closed) throw _error('LambdaContext accessed outside of callback.');
}
void checkClosedOrThrow() => _checkClosed();

@override
String get source {
Expand Down Expand Up @@ -96,11 +94,7 @@ class LambdaContext extends m.LambdaContext with HasSource,LambdaCtxWritable {
final sink = StringBuffer();

// Lambdas used for sections should parse with the current delimiters.
var delimiters = '{{ }}';
if (_node is SectionNode) {
final node = _node as SectionNode;
delimiters = node.delimiters;
}
final delimiters = _node is SectionNode ? (_node as SectionNode).delimiters : '{{ }}';

final nodes = parser.parse(
source, _renderer.lenient, _renderer.templateName, delimiters);
Expand Down

0 comments on commit 052383c

Please sign in to comment.