Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

chore: cleanup

Christian Fei0bf025d80f53
diff --git a/lib/server.js b/lib/server.js
index c96b663..a5bdcc3 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -10,21 +10,21 @@ export function createServer (repo = new Repository()) {
const stateChangeHandler = {
get(target, key) {
if (typeof target[key] === 'object' && target[key] !== null) {
- return new Proxy(target[key], stateChangeHandler);
+ return new Proxy(target[key], stateChangeHandler)
}
- return target[key];
+ return target[key]
},
set(target, prop, value) {
if (target[prop] !== value) broadcastSSE(JSON.stringify({type: 'state', state: target}), connections)
- target[prop] = value;
+ target[prop] = value
return true
- },
- };
+ }
+ }
const state = new Proxy({
downloading: {},
summarizing: {},
- }, stateChangeHandler);
+ }, stateChangeHandler)
const connections = []