Merge pull request #33 from csg2008/staged

修复 A 标签没有 href 属性时 link 值为 null 语法错,导致部分 A 标签事件不响应
This commit is contained in:
xiaoyifang 2022-03-26 13:43:01 +08:00 committed by GitHub
commit 82b2fd0ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;