Skip to content

Commit

Permalink
Fix missing statusmessage in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski committed Feb 6, 2023
1 parent 69cc694 commit 4be6c1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/senaite/impress/static/bundles/senaite.impress.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions webpack/app/senaite.impress.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,19 @@ class PublishController extends React.Component
if not response.ok
return @handleActionError response.statusText
response.blob().then (blob) =>
# NOTE: type is different per browser, e.g.:
# -> FireFox: "text/html; charset=utf-8"
# -> Chrome: "text/html"
type = blob.type
# handle PDF responses
if type == "application/pdf"
if type.startsWith("application/pdf")
return @handleActionBlobResponse blob
# handle all other types as text
return blob.text().then (text) =>
if type == "application/json"
if type.startsWith("application/json")
# XXX currently not handled any further
return @handleActionJSONResponse JSON.parse(text)
if type == "text/html"
if type.startsWith("text/html")
return @handleActionHTMLResponse text


Expand Down

0 comments on commit 4be6c1a

Please sign in to comment.