Skip to content

Commit

Permalink
Included fix with correct syntax for ep_guest on permissionDenied.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Oct 29, 2023
1 parent e4f1a97 commit c74c676
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports.eejsBlock_permissionDenied = (hookName, context) => {
if (user == null) return;
// Load the HTML into a throwaway div instead of calling $.load() to avoid
// https://github.com/cheeriojs/cheerio/issues/1031
const content = $.load('<div>', null, false).html(context.content);
const content = $.load('')('<div/>').html(context.content);
content.find('#permissionDenied')
.prepend(makeLogInOutButton(context.renderContext.req)
.css('float', 'right')
Expand All @@ -64,7 +64,7 @@ exports.eejsBlock_userlist = (hookName, context) => {
if (user == null) return;
// Load the HTML into a throwaway div instead of calling $.load() to avoid
// https://github.com/cheeriojs/cheerio/issues/1031
const content = $('<div>').html(context.content);
const content = $.load('')('<div/>').html(context.content);
content.find('#myuser').append(
makeLogInOutButton(context.renderContext.req).css('margin-left', '10px'));
context.content = content.html();
Expand Down

0 comments on commit c74c676

Please sign in to comment.