diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-29 12:35:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-29 12:35:39 +0200 |
commit | 698652a5484795c88b1f64dcc59765ca34f884a9 (patch) | |
tree | 66ef3e74e174a7e1d5215aec0237c0ae66bbcdcb /Userland/js.cpp | |
parent | 75f246dde8eb621a06b578078568f24ce7a972e4 (diff) | |
download | serenity-698652a5484795c88b1f64dcc59765ca34f884a9.zip |
LibJS: Make Value::as_string() return a PrimitiveString reference
Diffstat (limited to 'Userland/js.cpp')
-rw-r--r-- | Userland/js.cpp | 2 |
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()); |