diff --git a/src/js_realm.hpp b/src/js_realm.hpp index e7a15242..01d7899a 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -567,7 +567,7 @@ void RealmClass::wait_for_download_completion(ContextType ctx, FunctionType, EventLoopDispatcher wait_handler([=](std::error_code error_code) { HANDLESCOPE - if (error_code == std::error_code{}) { + if (!error_code) { //success Function::callback(protected_ctx, protected_callback, protected_this, 0, nullptr); }