Skip to content

Commit

Permalink
Merge pull request #33 from csg2008/staged
Browse files Browse the repository at this point in the history
修复 A 标签没有 href 属性时 link 值为 null 语法错,导致部分 A 标签事件不响应
  • Loading branch information
xiaoyifang authored Mar 26, 2022
2 parents 9ebf38f + a6800ee commit 82b2fd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/gd-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
$(function() {
$(document).on("click","a",function(event) {
var link = $(this).attr("href");
if ('string' != typeof(link)) {
return;
}
if(link.indexOf(":")>=0){
emitClickedEvent(link);
return false;
Expand Down

0 comments on commit 82b2fd0

Please sign in to comment.