Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit b6f86e0

Browse files
committed
Update forcetk.js
Handle trailing "/" on community pathname and only do replace if communityInd is true
1 parent c3b54bf commit b6f86e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

forcetk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if (forcetk.Client === undefined) {
6565
} else {
6666
// In Visualforce - still need proxyUrl for Apex REST methods
6767
this.proxyUrl = location.protocol + "//" + location.hostname
68-
+ (communityInd ? location.pathname : "") + "/services/proxy";
68+
+ (communityInd === true ? location.pathname.replace(/\/$/, "") : "") + "/services/proxy";
6969
}
7070
this.authzHeader = "Authorization";
7171
} else {

0 commit comments

Comments
 (0)