fix url hash check

This commit is contained in:
igoradamenko
2018-04-28 22:14:30 +03:00
parent 9567aafd60
commit db581ee23d
2 changed files with 2 additions and 9 deletions
-7
View File
@@ -1,10 +1,3 @@
major fixes:
- comment scroller:
we can't get access to window.parent.location,
so we need to use postMessage for pushing location.hash
into the iframe
major features:
- improve design
+2 -2
View File
@@ -59,8 +59,8 @@ export default class Root extends Component {
}
checkUrlHash() {
if (window.parent.location.hash.indexOf('#remark__comment-') === 0) {
const comment = document.querySelector(window.parent.location.hash);
if (window.location.hash.indexOf('#remark__comment-') === 0) {
const comment = document.querySelector(window.location.hash);
if (comment) {
setTimeout(() => {