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

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

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

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

Loading…
Cancel
Save