Skip to content

Commit

Permalink
Merge pull request #48 from Keithcat1/pr1
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy authored Oct 26, 2022
2 parents 4f7cce7 + 3e0a427 commit c5aea7c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/interactive/lib/src/executor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ class Executor {
log.info('Phase: Evaluate');
final isolateInfo = await workspaceIsolate.isolateInfo;
final targetId = isolateInfo.rootLib!.id!;
final response = await vm.vmService
Response response = await vm.vmService
.evaluate(workspaceIsolate.isolateId, targetId, _evaluateCode);

if(response is InstanceRef && response.valueAsString == null) {
// InstanceRef.valueAsString only works on primitive values like String, int, double ETC, so for anything else we have to ask the VM to get the toString value
response = await vm.vmService.evaluate(workspaceIsolate.isolateId, response.id!, "this.toString()");
}
_handleEvaluateResponse(response);
}

Expand Down

0 comments on commit c5aea7c

Please sign in to comment.