-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from felddy/improvement/issue_patch
Add hotfix for routePrefix issue 3817.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
# Issue Hotfix | ||
# ===================== | ||
# Corrects routePrefix problem detailed in issue 3817 | ||
# https://gitlab.com/foundrynet/foundryvtt/-/issues/3817 | ||
|
||
# s/const view = url\.pathname\.replace(`\/\${ROUTE_PREFIX}`, "");\ | ||
# /const view = url.pathname.split("\/").pop();/g | ||
|
||
PATCH_DEST="$FOUNDRY_HOME/resources/app/public/scripts/foundry.js" | ||
PATCH_DOC_URL="https://gitlab.com/foundrynet/foundryvtt/-/issues/3817#note_430588341" | ||
PATCH_NAME="Issue 3817 Hotfix for 0.7.4" | ||
TARGET_FOUNDRY_VERSION="0.7.4" | ||
|
||
if [ "$FOUNDRY_VERSION" = "$TARGET_FOUNDRY_VERSION" ]; then | ||
log "Applying \"${PATCH_NAME}\"" | ||
log "See: ${PATCH_DOC_URL}" | ||
sed --file=- --in-place=.orig "${PATCH_DEST}" << SED_SCRIPT | ||
s/const view = url\.pathname\.replace(\`\/\${ROUTE_PREFIX}\`, "");\ | ||
/const view = url.pathname.split("\/").pop();/g | ||
SED_SCRIPT | ||
else | ||
log_warn "Not applying \"${PATCH_NAME}\". This patch is targeted for Foundry Virtual Tabletop ${TARGET_FOUNDRY_VERSION}" | ||
fi |