mirror of
https://github.com/outline/outline.git
synced 2026-11-25 15:15:15 +03:00
1 parent
b093acd94f
commit
97c8bfc27f
1 file changed
+5
-1
@@ -52,7 +52,11 @@ class Editor extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
this.redirectTo = navigateTo;
|
||||
// protect against redirecting back to the same place
|
||||
const currentLocation = window.location.pathname + window.location.hash;
|
||||
if (currentLocation !== navigateTo) {
|
||||
this.redirectTo = navigateTo;
|
||||
}
|
||||
} else {
|
||||
window.open(href, '_blank');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user