diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index 440f040ffdb75ea1e344352027d6e6f8f981ec57..f9f2b2b572958f19f5fa4f030e71b1ee7c2afc5d 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -2310,7 +2310,7 @@ bool MainThread::PrepareAbilityDelegator(const std::shared_ptr & auto testRunner = TestRunner::Create(runtime, args, false); auto delegator = IAbilityDelegator::Create(runtime, application_->GetAppContext(), std::move(testRunner), record->observer); - AbilityDelegatorRegistry::RegisterInstance(delegator, args, AbilityRuntime::Runtime::Language::JS); + AbilityDelegatorRegistry::RegisterInstance(delegator, args, runtime->GetLanguage()); delegator->SetApiTargetVersion(targetVersion); delegator->Prepare(); } @@ -2321,7 +2321,7 @@ bool MainThread::PrepareAbilityDelegator(const std::shared_ptr & auto testRunner = TestRunner::Create(runtime, args, false); auto delegator = IAbilityDelegator::Create(runtime, application_->GetAppContext(), std::move(testRunner), record->observer); - AbilityDelegatorRegistry::RegisterInstance(delegator, args, AbilityRuntime::Runtime::Language::STS); + AbilityDelegatorRegistry::RegisterInstance(delegator, args, runtime->GetLanguage()); delegator->SetApiTargetVersion(targetVersion); delegator->Prepare(); }