Skip to content

Commit

Permalink
fix: resolves JS issues introduced in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmeese7 committed Sep 26, 2023
1 parent cb622b4 commit e68bd9d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion frontend/client/src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default class Auth {
* @type {AuthCallback}
* @readonly
*/
this.callback = function() {};
this.callback = function() { /* noop */ };

/**
* Core instance reference.
Expand Down Expand Up @@ -257,6 +257,8 @@ export default class Auth {
logger.warn("Exception on login:", e);
}

// TODO: Show something like "incorrect username or password" instead of "Login failed"
// if there wasn't a technical error
this.ui.emit("login:error", "Login failed");
this.ui.emit("login:stop");

Expand Down
2 changes: 1 addition & 1 deletion frontend/client/src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export default class Window extends EventEmitter {
* @param {Function} [callback] Callback when window DOM has been constructed
* @returns {Window} this instance
*/
render(callback = function() {}) {
render(callback = function() { /* noop */ }) {
if (this.rendered) {
return this;
} else if (!this.inited) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/dialogs/src/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class Dialog {
* @param {Object} [options.defaultValue] Default callback value
* @param {Function} [callback=function() {}] The callback function
*/
constructor(core, args, options, callback = function() {}) {
constructor(core, args, options, callback = function() { /* noop */ }) {
this.core = core;
this.args = args;
this.callback = callback;
Expand Down
3 changes: 1 addition & 2 deletions frontend/panels/src/items/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default class WindowsPanelItem extends PanelItem {

const windows = state.windows
.concat([win])
.filter((win) => !win.inited || !win.rendered)
.filter((w) => !w.inited || !w.rendered)
.filter(filterVisibility);

return { windows };
Expand Down Expand Up @@ -208,7 +208,6 @@ export default class WindowsPanelItem extends PanelItem {
);

const children = [...windows, ...special];

return super.render("windows", children);
}
}

0 comments on commit e68bd9d

Please sign in to comment.