Skip to content

Commit

Permalink
修复 A 标签没有 href 属性时 link 值为 null 语法错,导致部分 A 标签事件不响应
Browse files Browse the repository at this point in the history
  • Loading branch information
csg2008 authored Mar 26, 2022
1 parent cc4e291 commit a6800ee
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 a6800ee

Please sign in to comment.