Skip to content

Commit

Permalink
22.0.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Oct 20, 2023
1 parent fb18030 commit 6e12fc1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/webapp/plugins/nextcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,21 +543,27 @@ Draw.loadPlugin(function(ui)

ui.installMessageHandler = function(callback)
{
origInstallMessageHandler.call(this, function()
origInstallMessageHandler.call(this, function(xml, evt)
{
try
{
// New empty files
if (JSON.parse(evt.data).xml == ' ') return;
}
catch (e) {} // Ignore

callback.apply(this, arguments);

var file = ui.getCurrentFile();
loadDescriptor = loadDescriptor || {};

// New files call this twice, so we need to check if the file is loaded
if (!loadDescriptor.isLoaded)
{
loadDescriptor.isLoaded = true;
file.setDescriptor(loadDescriptor);
ui.fileLoaded(file, true);
}

loadDescriptor.isLoaded = true;
});
}

Expand Down

0 comments on commit 6e12fc1

Please sign in to comment.