Fix PCS issues: duplicate templates and offline PCS

pull/1/head
yflory 4 years ago
parent d74b2b6316
commit 3952b2f013

@ -2105,6 +2105,16 @@ define([
var sframeChan = common.getSframeChannel();
var metadataMgr = common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData();
if (privateData.offline) {
metadataMgr.onChange(function () {
var privateData = metadataMgr.getPrivateData();
if (privateData.offline) { return; }
UIElements.getPadCreationScreen(common, cfg, appCfg, cb);
});
return;
}
var type = metadataMgr.getMetadataLazy().type || privateData.app;
var fromFileData = privateData.fromFileData;

@ -1229,6 +1229,7 @@ define([
var data = obj.data;
if (channels.indexOf(data.channel) !== -1) { return; }
var id = obj.id;
if (data.channel) { channels.push(data.channel); }
var parsed = Hash.parsePadUrl(data.href || data.roHref);
if ((!types || types.length === 0 || types.indexOf(parsed.type) !== -1) &&
!isFiltered(parsed.type, data)) {

Loading…
Cancel
Save