mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibJS: Don't die when making PrimitiveString from "" DeprecatedFlyString
This commit is contained in:
parent
ecfcc9aef3
commit
eda2a6d9f7
1 changed files with 2 additions and 0 deletions
|
@ -223,6 +223,8 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, DeprecatedString s
|
|||
|
||||
NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, DeprecatedFlyString const& string)
|
||||
{
|
||||
if (string.is_empty())
|
||||
return vm.empty_string();
|
||||
return create(vm, *string.impl());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue