Skip to content

Commit

Permalink
bugfix spa.mode
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 2, 2024
1 parent bb6ba37 commit 66af2b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spa/src/webly/spa/mode.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(:require-macros
[webly.build.prefs :refer [get-pref]])
(:require
[clojure.string :as str]
[taoensso.timbre :refer-macros [info warn]]
[webly.spa.mode.url :refer [current-path entry-path]]
[shadow.loader :as shadow-loader]))
Expand Down Expand Up @@ -39,7 +40,9 @@
(if (= mode "static")
(let [cpath (current-path)
epath (entry-path)
resource-path (str epath "r/")]
resource-path (if (str/ends-with? epath "/")
(str epath "r/")
(str epath "/r/"))]
(reset! mode-a :static)
(info "static mode: routing-path:" cpath " resource-path:" resource-path)
(reset! routing-path-a cpath)
Expand All @@ -48,5 +51,4 @@
(let [resource-path "/r/"]
(reset! resource-path-a resource-path)
(info "dynamic mode: routing-path:" (get-routing-path) " resource-path:" (get-resource-path))
(shadow-loader/init ""))))

(shadow-loader/init ""))))

0 comments on commit 66af2b6

Please sign in to comment.