Skip to content

Commit

Permalink
fix(window/win): fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Aug 1, 2024
1 parent 235154e commit 1871449
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/window/win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1312,12 +1312,12 @@ namespace SSC {
this->webview->ExecuteScript(
convertStringToWString(source).c_str(),
Microsoft::WRL::Callback<ICoreWebView2ExecuteScriptCompletedHandler>(
[=, this](HRESULT error, LPCWSTR result) {
[=, this](HRESULT error, PCWSTR result) -> HRESULT {
if (callback != nullptr) {
if (error != S_OK) {
// TODO(@jwerle): figure out how to get the error message here
callback(JSON::Error("An unknown error occurred"))
return;
callback(JSON::Error("An unknown error occurred"));
return error;
}

const auto string = convertWStringToString(result);
Expand All @@ -1334,7 +1334,7 @@ namespace SSC {
number = std::stod(string);
} catch (...) {
callback(string);
return;
return S_OK;
}

callback(number);
Expand All @@ -1343,7 +1343,7 @@ namespace SSC {

return S_OK;
}
)
).Get()
);
});
}
Expand Down

0 comments on commit 1871449

Please sign in to comment.