Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/meeseOS/meeseOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmeese7 committed Sep 26, 2023
2 parents bff5202 + b0bd7d0 commit 95754c3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions apps/old-site/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function registerValidSW(swUrl, config) {
);

// Execute callback
if (config && config.onUpdate) {
if (config?.onUpdate) {
config.onUpdate(registration);
}
} else {
Expand All @@ -85,7 +85,7 @@ function registerValidSW(swUrl, config) {
console.log("Content is cached for offline use.");

// Execute callback
if (config && config.onSuccess) {
if (config?.onSuccess) {
config.onSuccess(registration);
}
}
Expand Down
3 changes: 1 addition & 2 deletions apps/old-site/src/components/home/MainBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ const MainBody = () => {
</h1>
<TypingAnimation />
<div className="p-5" id="socialIcons">
{icons &&
icons.map((icon) => (
{icons?.map((icon) => (
<a
key={icon.id}
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion backend/event-emitter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class EventEmitter {
console.warn(e);
}

if (options && options.once) {
if (options?.once) {
this.events[n].splice(i, 1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion backend/server/src/filesystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Filesystem {
async unmount(mountpoint) {
const found = this.watches.find((w) => w.id === mountpoint.id);

if (found && found.watch) {
if (found?.watch) {
await found.watch.close();
}

Expand Down
2 changes: 1 addition & 1 deletion backend/server/src/vfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const createMiddleware = (core) => {

const createOptions = (req) => {
const options = req.fields.options;
const range = req.headers && req.headers.range;
const range = req.headers?.range;
const session = { ...(req.session || {}) };
let result = options || {};

Expand Down
2 changes: 1 addition & 1 deletion frontend/client/src/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class Search {
if (this.ui) {
const win = Window.lastWindow();

this.focusLastWindow = win && win.blur();
this.focusLastWindow = win?.blur();

this.ui.emit("toggle", true);
setTimeout(() => this.focus(), 1);
Expand Down
4 changes: 2 additions & 2 deletions frontend/client/src/utils/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export const getCascadePosition = (win, rect, pos) => {
};

const getScreenOrientation = (screen) =>
screen && screen.orientation
screen?.orientation
? screen.orientation.type
: window.matchMedia("(orientation: portrait)")
? "portrait"
Expand Down Expand Up @@ -430,7 +430,7 @@ export const loadOptionsFromConfig = (config, appName, windowId) => {
return true;
});

const foundOptions = found && found.options ? found.options : {};
const foundOptions = found?.options ? found.options : {};
const allowedProperties = ["position", "dimension", "attributes"];

return allowedProperties.reduce(
Expand Down
2 changes: 1 addition & 1 deletion frontend/widgets/src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default class Widget {
this.dialog.destroy();
}

if (this.$element && this.$element.parentNode) {
if (this.$element?.parentNode) {
this.$element.remove();
}

Expand Down

0 comments on commit 95754c3

Please sign in to comment.