Don't check for stronger hash if we have an edit hash
This commit is contained in:
parent
462c229b17
commit
36550b781f
@ -300,6 +300,8 @@ Version 1
|
|||||||
var rHref = href || getRelativeHref(window.location.href);
|
var rHref = href || getRelativeHref(window.location.href);
|
||||||
var parsed = parsePadUrl(rHref);
|
var parsed = parsePadUrl(rHref);
|
||||||
if (!parsed.hash) { return false; }
|
if (!parsed.hash) { return false; }
|
||||||
|
// We can't have a stronger hash if we're already in edit mode
|
||||||
|
if (parsed.hashData && parsed.hashData.mode === 'edit') { return; }
|
||||||
var stronger;
|
var stronger;
|
||||||
Object.keys(recents).some(function (id) {
|
Object.keys(recents).some(function (id) {
|
||||||
var pad = recents[id];
|
var pad = recents[id];
|
||||||
|
|||||||
@ -557,6 +557,11 @@ define([
|
|||||||
return void cb(null, hashes);
|
return void cb(null, hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hashes.editHash) {
|
||||||
|
// no need to find stronger if we already have edit hash
|
||||||
|
return void cb(null, hashes);
|
||||||
|
}
|
||||||
|
|
||||||
postMessage("GET_STRONGER_HASH", {
|
postMessage("GET_STRONGER_HASH", {
|
||||||
href: window.location.href
|
href: window.location.href
|
||||||
}, function (hash) {
|
}, function (hash) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user