jsir 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmd/oaa.js +2 -2
- package/deps/room.js +4 -1
- package/package.json +1 -1
package/cmd/oaa.js
CHANGED
|
@@ -562,13 +562,13 @@ async function wrapperInput(str) {
|
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
function wrapperAlias(str) {
|
|
565
|
-
let aliasMap =
|
|
565
|
+
let aliasMap = null;
|
|
566
566
|
try {
|
|
567
567
|
aliasMap = getConfig("alias");
|
|
568
568
|
} catch (e) {
|
|
569
569
|
console.$error("getAlias failed ", e);
|
|
570
570
|
}
|
|
571
|
-
if (Object.keys(aliasMap).length <= 0) {
|
|
571
|
+
if (!aliasMap || Object.keys(aliasMap).length <= 0) {
|
|
572
572
|
return str;
|
|
573
573
|
}
|
|
574
574
|
let fstr = str.split(/\s+/)[0];
|
package/deps/room.js
CHANGED
|
@@ -117,7 +117,7 @@ async function syncRooms() {
|
|
|
117
117
|
await fileLock(roomsDirLockKey, async () => {
|
|
118
118
|
for (let syncRoom of syncRooms) {
|
|
119
119
|
if (syncRoom.selfNode) {
|
|
120
|
-
await fp.writeFile(syncRoom.selfNode, JSON.stringify(syncRoom, null, 2))
|
|
120
|
+
await fp.writeFile(roomsDir + "/" + syncRoom.selfNode, JSON.stringify(syncRoom, null, 2))
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
})
|
|
@@ -148,6 +148,9 @@ async function _syncSetting(room) {
|
|
|
148
148
|
let rooms = []
|
|
149
149
|
let files = await fp.readdir(roomDir);
|
|
150
150
|
for (let node of setting.selfRoom.nodes) {
|
|
151
|
+
if (setting.selfRoom.selfNode === node) {
|
|
152
|
+
continue
|
|
153
|
+
}
|
|
151
154
|
if (files.indexOf(node) !== -1) {
|
|
152
155
|
let resp = String(await fp.readFile(roomDir + '/' + node));
|
|
153
156
|
let room = JSON.parse(resp);
|