I have found unexpected behaviour when calling functions in clojurescritpt
In the function below, I had to clone the dates or they came back mutated:
(defn ical [data]
(reify
om/IDisplayName
(display-name [_]
(or (:react-name opts) "calendar"))
om/IRender
(render [this]
(let [today (js/moment (new js/Date))
first-day-of-month (first-day-of-month (.clone today))
last-day-of-month (last-day-of-month (.clone today))]
I realise the dates are mutable in javascript but I thought the compilation
took care of this type of thing for you?
Cheers
Paul Cowan
Cutting-Edge Solutions (Scotland)
blog: http://thesoftwaresimpleton.com/
website: http://www.cuttingedgesolutionsscotland.com/
In the function below, I had to clone the dates or they came back mutated:
(defn ical [data]
(reify
om/IDisplayName
(display-name [_]
(or (:react-name opts) "calendar"))
om/IRender
(render [this]
(let [today (js/moment (new js/Date))
first-day-of-month (first-day-of-month (.clone today))
last-day-of-month (last-day-of-month (.clone today))]
I realise the dates are mutable in javascript but I thought the compilation
took care of this type of thing for you?
Cheers
Paul Cowan
Cutting-Edge Solutions (Scotland)
blog: http://thesoftwaresimpleton.com/
website: http://www.cuttingedgesolutionsscotland.com/