Skip to content

Commit 92bbe38

Browse files
committed
Keep Tommy compatible with Unity 2021
1 parent eff0457 commit 92bbe38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

UnityMcpBridge/Editor/External/Tommy.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public override void WriteTo(TextWriter tw, string name = null)
347347
return;
348348
}
349349

350-
if (Comment is not null)
350+
if (!(Comment is null))
351351
{
352352
tw.WriteLine();
353353
Comment.AsComment(tw);
@@ -363,7 +363,7 @@ public override void WriteTo(TextWriter tw, string name = null)
363363

364364
foreach (var tomlNode in RawArray)
365365
{
366-
if (tomlNode is not TomlTable tbl)
366+
if (!(tomlNode is TomlTable tbl))
367367
throw new TomlFormatException("The array is marked as array table but contains non-table nodes!");
368368

369369
// Ensure it's parsed as a section
@@ -1676,7 +1676,7 @@ private TomlTable CreateTable(TomlNode root, IList<string> path, bool arrayTable
16761676

16771677
if (node.HasValue)
16781678
{
1679-
if (node is not TomlArray { IsTableArray: true } array)
1679+
if (!(node is TomlArray { IsTableArray: true } array))
16801680
{
16811681
AddError($"The key {".".Join(path)} has a value assigned to it!");
16821682
return null;

0 commit comments

Comments
 (0)