Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
And add another fallback in the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
n2o committed Dec 15, 2016
1 parent d447bad commit 22d9386
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject cruncher "0.3.1"
(defproject cruncher "0.3.2"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/cruncher/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

(enable-console-print!)

(.log js/console "Started Cruncher Version 0.3.1")
(.log js/console "Started Cruncher Version 0.3.2")

(om/add-root! lib/reconciler views/Main (gdom/getElement "cruncher-main"))

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/cruncher/utils/lib.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@
(defn get-pokemon-by-id
"Look up database to return complete pokemon by its id."
[pokemon-id]
(get pokemon/all pokemon-id))
(if-let [mon (get pokemon/all pokemon-id)]
mon
{:pokemon-id -1, :name "not-in-database", :weaknesses ["nil" "nil"], :type-1 ["nil"], :classification "nil", :fast-attacks ["-1" "-1"], :weight "-1 kg", :previous-evolutions [-1], :height "-1 m"}))

(defn playerinfo
"Return the stored Playerinformation"
Expand Down

0 comments on commit 22d9386

Please sign in to comment.