summaryrefslogtreecommitdiff
path: root/Userland/js.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-29 12:35:39 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-29 12:35:39 +0200
commit698652a5484795c88b1f64dcc59765ca34f884a9 (patch)
tree66ef3e74e174a7e1d5215aec0237c0ae66bbcdcb /Userland/js.cpp
parent75f246dde8eb621a06b578078568f24ce7a972e4 (diff)
downloadserenity-698652a5484795c88b1f64dcc59765ca34f884a9.zip
LibJS: Make Value::as_string() return a PrimitiveString reference
Diffstat (limited to 'Userland/js.cpp')
-rw-r--r--Userland/js.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/js.cpp b/Userland/js.cpp
index e2a4ed489c..93fa1fd18c 100644
--- a/Userland/js.cpp
+++ b/Userland/js.cpp
@@ -322,7 +322,7 @@ JS::Value ReplObject::load_file(JS::Interpreter& interpreter)
return JS::Value(false);
for (auto& file : interpreter.call_frame().arguments) {
- String file_name = file.as_string()->string();
+ String file_name = file.as_string().string();
auto js_file = Core::File::construct(file_name);
if (!js_file->open(Core::IODevice::ReadOnly)) {
fprintf(stderr, "Failed to open %s: %s\n", file_name.characters(), js_file->error_string());