ソースを参照

Quick syntax fix with frontend/auth.js

theflametrooper 8 年 前
コミット
97d3b577d0
1 ファイル変更5 行追加8 行削除
  1. 5 8
      frontend/auth.js

+ 5 - 8
frontend/auth.js

@@ -7,20 +7,17 @@ export default {
 	username: '',
 	role: 'default',
 
-	getStatus: function(cb) {
-		if (this.ready) {
-			cb(this.authenticated, this.role, this.username);
-		} else {
-			callbacks.push(cb);
-		}
+	getStatus: function (cb) {
+		if (this.ready) cb(this.authenticated, this.role, this.username);
+		else callbacks.push(cb);
 	},
 
-	data: function(authenticated, role, username) {
+	data: function (authenticated, role, username) {
 		this.authenticated = authenticated;
 		this.role = role;
 		this.username = username;
 		this.ready = true;
-		callbacks.forEach((callback) => {
+		callbacks.forEach(callback => {
 			callback(authenticated, role, username);
 		});
 		callbacks = [];