From 78bc89f8e8f34a54b7b5019bd5d069ec9e285867 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Wed, 12 Jun 2013 22:17:57 +0200 Subject: [PATCH] Fix SETF for OGET aka OSET. --- src/compiler.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index c988050..071873d 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1362,8 +1362,8 @@ (js!selfcall "var tmp = (" (ls-compile object) ")[xstring(" (ls-compile key) ")];" *newline* (mapconcat (lambda (key) - (code "if (tmp === undefined) return " (ls-compile nil) ";" *newline*) - (code "tmp = tmp[xstring(" (ls-compile key) ")];" *newline*)) + (code "if (tmp === undefined) return " (ls-compile nil) ";" *newline* + "tmp = tmp[xstring(" (ls-compile key) ")];" *newline*)) keys) "return tmp === undefined? " (ls-compile nil) " : tmp;" *newline*)) @@ -1372,8 +1372,8 @@ (js!selfcall "var obj = " (ls-compile object) ";" *newline* (mapconcat (lambda (key) - "obj = obj[xstring(" (ls-compile key) ")];" - "if (obj === undefined) throw 'Impossible to set Javascript property.';" *newline*) + (code "obj = obj[xstring(" (ls-compile key) ")];" + "if (obj === undefined) throw 'Impossible to set Javascript property.';" *newline*)) (butlast keys)) "var tmp = obj[xstring(" (ls-compile (car (last keys))) ")] = " (ls-compile value) ";" *newline* "return tmp === undefined? " (ls-compile nil) " : tmp;" *newline*))) -- 1.7.10.4