Browse Source

fix(layer): 修复 layer.path 潜在的缺陷 (#2257)

* fix(layer): 修复 layer.path 潜在的缺陷

* chore(layer): update
pull/2260/head
贤心 2 months ago committed by GitHub
parent
commit
eace40f0cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      src/modules/layer.js

4
src/modules/layer.js

@ -11,8 +11,8 @@ var $;
var win;
var ready = {
getPath: function(){
var jsPath = document.currentScript ? document.currentScript.src : function(){
var js = document.scripts;
var jsPath = (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') ? document.currentScript.src : function(){
var js = document.getElementsByTagName('script');
var last = js.length - 1;
var src;
for(var i = last; i > 0; i--){

Loading…
Cancel
Save