Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 6fe8811

Browse files
committed
move error handling
1 parent 7e72a32 commit 6fe8811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

evals/lib/eval.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ def edit_artifact(llm, css_path:, js_path:, html_path:, instructions_path:)
218218
raise EvalError.new("Failed to apply all changes", diff.failed_searches)
219219
end
220220

221-
raise EvalError.new("Invalid JS", artifact.js) if !valid_javascript?(artifact.js)
222-
223221
version = artifact.versions.last
222+
raise EvalError.new("Invalid JS", version.js) if !valid_javascript?(version.js)
223+
224224
output = { css: version.css, js: version.js, html: version.html }
225225

226226
artifact.destroy

0 commit comments

Comments
 (0)