Rhino 8 ScriptEditor: Surface/Brep Conversion Error

Hello everyone,
In Rhino 8, Grasshopper’s C# component and the ScriptEditor plugin behave inconsistently in type handling: in GH, a Surface input runs without issue, whereas in the ScriptEditor plugin the same code throws a type conversion error: Object of type 'Rhino.Geometry.Brep' cannot be converted to type 'Rhino.Geometry.Surface' .


bug.gh (4.5 KB)
Untrim Surface.Components.gha (33 KB)