Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add scope.setContexts conditions
  • Loading branch information
rxlabz committed Oct 30, 2020
commit 00b5fbae55954ee9a35caa2c59e2eae36f1b3375
5 changes: 2 additions & 3 deletions dart/lib/src/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ class Scope {

/// add an entry to the Scope's contexts
void setContexts(String key, Object value) {
// TODO replace all assertions with ArgumentError ?
assert(key != null && value != null);
assert(value is num || value is bool || value is String);
if ((key != null && value != null) &&
!(value is num || value is bool || value is String)) return;

_contexts[key] = value;
}
Expand Down