fix version stamp Map check (#9890)

This commit is contained in:
Yegor
2017-05-08 12:59:33 -07:00
committed by GitHub
parent a29585298e
commit fa47c34f76

View File

@@ -285,8 +285,9 @@ class VersionCheckStamp {
try {
final dynamic json = JSON.decode(versionCheckStamp);
if (json is Map) {
printTrace('Warning: expected version stamp to be a Map but found: $json');
return fromJson(json);
} else {
printTrace('Warning: expected version stamp to be a Map but found: $json');
}
} catch (error, stackTrace) {
// Do not crash if JSON is malformed.