LibJS: Correct tiny issue with passing a String to String::format

I'm not sure how this even _builds_
This commit is contained in:
AnotherTest 2020-05-08 22:36:38 +04:30 committed by Andreas Kling
parent 0901b17126
commit bd12f132f3
Notes: sideshowbarker 2024-07-19 06:52:45 +09:00

View file

@ -151,7 +151,7 @@ Value CallExpression::execute(Interpreter& interpreter) const
for (auto ch : static_cast<const StringObject&>(value.as_object()).primitive_string().string())
iterables.append(Value(js_string(interpreter, String::format("%c", ch))));
} else {
interpreter.throw_exception<TypeError>(String::format("%s is not iterable", value.to_string()));
interpreter.throw_exception<TypeError>(String::format("%s is not iterable", value.to_string().characters()));
}
for (auto& value : iterables)
arguments.append(value);