nextcloud / officeonline

officeonline
43 stars 15 forks source link

fix(UI): script to register at viewer has to require viewer #558

Closed blizzz closed 3 months ago

blizzz commented 3 months ago

Summary

avoids conditions where registering is attempted when OCA.Viewer is not established yet

Checklist

blizzz commented 3 months ago

@juliushaertl we discussed the problem i was facing yesterday. with this change, i can open documents properly now on the dev setup.

blizzz commented 3 months ago

We should probably rather make use of nextcloud/server#30015 and add viewer as 3rd parameter to https://github.com/nextcloud/officeonline/blob/main/lib/Listener/LoadViewerListener.php#L13 so that the officeonline script is only loaded after viewer has been.

Cool. Did not know we have that.

blizzz commented 3 months ago

Changed the PR accordingly.