diff --git a/module/my/js/common.js b/module/my/js/common.js index 60242230cc..ad12c9cff0 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -5,7 +5,10 @@ $(function() $('#subNavbar li[data-id=' + mode + ']').addClass('active'); if(typeof rawMethod === 'string' && rawMethod == 'work') $('#subNavbar li[data-id=' + mode + '] a').append('' + total + ''); } - var scp = $('[data-id="changePassword"] a'); - var sign = config.requestType == 'GET' ? '&' : '?'; - scp.attr('href', scp.attr('href') + sign + 'onlybody=yes').modalTrigger({width:500, type:'iframe'}); + var $scp = $('[data-id="changePassword"] a'); + if($scp.length > 0) + { + var sign = config.requestType == 'GET' ? '&' : '?'; + $scp.attr('href', $scp.attr('href') + sign + 'onlybody=yes').modalTrigger({width:500, type:'iframe'}); + } });