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
use const keys
  • Loading branch information
rxlabz committed Oct 29, 2020
commit 39352a7929b0bb02190a1cc98e2f02ac667ecd95
10 changes: 5 additions & 5 deletions dart/lib/src/protocol/contexts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Contexts extends MapView {
case Device.type:
Map<String, dynamic> deviceMap;
if ((deviceMap = device.toJson()).isNotEmpty) {
json['device'] = deviceMap;
json[Device.type] = deviceMap;
}
break;
case OperatingSystem.type:
Expand All @@ -102,17 +102,17 @@ class Contexts extends MapView {
}
break;

case 'browser':
case Browser.type:
Map<String, dynamic> browserMap;
if ((browserMap = browser.toJson()).isNotEmpty) {
json['browser'] = browserMap;
json[Browser.type] = browserMap;
}
break;

case 'gpu':
case Gpu.type:
Map<String, dynamic> gpuMap;
if ((gpuMap = gpu.toJson()).isNotEmpty) {
json['gpu'] = gpuMap;
json[Gpu.type] = gpuMap;
}
break;

Expand Down