Merge branch 'soon' into staging

pull/1/head
yflory 7 years ago
commit 7948fe2b70

@ -468,7 +468,7 @@ define([
if (typeof(meta) === "object") { if (typeof(meta) === "object") {
meta.defaultTitle = meta.title || meta.defaultTitle; meta.defaultTitle = meta.title || meta.defaultTitle;
delete meta.users; delete meta.users;
delete meta.title; meta.title = "";
} }
val = JSON.stringify(parsed); val = JSON.stringify(parsed);
} catch (e) { } catch (e) {
@ -497,6 +497,13 @@ define([
if (typeof (data.title) !== "string") { return cb('Missing title'); } if (typeof (data.title) !== "string") { return cb('Missing title'); }
if (data.title.trim() === "") { data.title = Hash.getDefaultName(parsed); } if (data.title.trim() === "") { data.title = Hash.getDefaultName(parsed); }
if (common.initialPath) {
if (!data.path) {
data.path = common.initialPath;
delete common.initialPath;
}
}
postMessage("SET_PAD_TITLE", data, function (obj) { postMessage("SET_PAD_TITLE", data, function (obj) {
if (obj && obj.error) { if (obj && obj.error) {
console.log("unable to set pad title"); console.log("unable to set pad title");
@ -892,7 +899,7 @@ define([
driveEvents: rdyCfg.driveEvents // Boolean driveEvents: rdyCfg.driveEvents // Boolean
}; };
if (sessionStorage[Constants.newPadPathKey]) { if (sessionStorage[Constants.newPadPathKey]) {
cfg.initialPath = sessionStorage[Constants.newPadPathKey]; common.initialPath = sessionStorage[Constants.newPadPathKey];
delete sessionStorage[Constants.newPadPathKey]; delete sessionStorage[Constants.newPadPathKey];
} }

Loading…
Cancel
Save