Skip to content

Commit

Permalink
fix: rm replace https logic
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 1, 2023
1 parent 5f61520 commit 4c4daa9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
var nx = global.nx || require('@jswork/next');

nx.gpid = function (inUrl) {
if (!inUrl) return '';
var url = inUrl.replace('http://', 'https://');
var url = inUrl || location.href || '';
var filename = url.substring(url.lastIndexOf('/') + 1);
return filename.split('.')[0];
};
Expand Down

0 comments on commit 4c4daa9

Please sign in to comment.