Skip to content

提高getLocation函数的ie8兼容性#344

Merged
RubyLouvre merged 2 commits intoRubyLouvre:masterfrom
ambit-tsai:master
Oct 4, 2018
Merged

提高getLocation函数的ie8兼容性#344
RubyLouvre merged 2 commits intoRubyLouvre:masterfrom
ambit-tsai:master

Conversation

@ambit-tsai
Copy link
Contributor

getLocation函数内容转义后为return Object.assign({}, source.location, {/*略*/});
当使用babel-polyfill提供Object.assign语法支持时,会报错:Object.prototype.propertyIsEnumerable: 'this' 不是 JavaScript 对象
使用for循环替换Object.assign进行属性复制。

getLocation函数内容转义后为`return Object.assign({}, source.location, {/*略*/});`。
当使用babel-polyfill提供Object.assign语法支持时,会报错:`Object.prototype.propertyIsEnumerable: 'this' 不是 JavaScript 对象`。
使用for循环替换Object.assign进行属性复制。
判断条件写反了,去掉`!`
@RubyLouvre RubyLouvre merged commit 04adba1 into RubyLouvre:master Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants