Skip to content

Commit

Permalink
Merge pull request #654 from adobe/issue-638
Browse files Browse the repository at this point in the history
fix: detect sharepoint folder URL with RootFolder param
  • Loading branch information
rofe committed Jan 12, 2024
2 parents 578e0f9 + 62b0874 commit 953da41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extension/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ import sampleRUM from './rum.js';
*/
function isSharePointFolder(sk, url) {
if (isSharePointDM(sk, url)) {
const docPath = new URLSearchParams(url.search).get('id');
const sp = new URLSearchParams(url.search);
const docPath = sp.get('id') || sp.get('RootFolder');
const dotIndex = docPath?.split('/').pop().indexOf('.');
return [-1, 0].includes(dotIndex); // dot only allowed as first char
}
Expand Down

0 comments on commit 953da41

Please sign in to comment.