Skip to content

Commit

Permalink
v1.8.5
Browse files Browse the repository at this point in the history
- fix: don't fallback to run_command
  • Loading branch information
solvedDev authored Dec 13, 2022
1 parent d902797 commit f7cd8ef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
46 changes: 24 additions & 22 deletions app/renderer/src/bridgeCore/EntityHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ async function transformEvent(
let { commands: e_c } = use(event, 'execute') || {}
if (typeof e_c === 'string') e_c = [e_c]
if (e_c !== undefined && Array.isArray(e_c)) {
if (compare(formatVersion, '1.16.100', '<')) {
// Disabled because run_command is still experimental
// if (compare(formatVersion, '1.16.100', '<')) {
let e_c_group = `execute_command_id_${++COM_ID_COUNTER}`

if (!COMMAND_ANIM_REGISTERED) {
Expand Down Expand Up @@ -147,27 +148,28 @@ async function transformEvent(
},
}
)
} else {
if (event?.run_command?.command === undefined)
event.run_command = {
...(event.run_command ?? {}),
command: await transformRunCommands(
file_uuid,
e_c.map(c => (c[0] === '/' ? c.slice(1) : c))
),
}
else {
if (typeof event.run_command.command === 'string')
event.run_command.command = [event.run_command.command]
if (Array.isArray(event.run_command.command))
event.run_command.command.push(
...(await transformRunCommands(
file_uuid,
e_c.map(c => (c[0] === '/' ? c.slice(1) : c))
))
)
}
}

// } else {
// if (event?.run_command?.command === undefined)
// event.run_command = {
// ...(event.run_command ?? {}),
// command: await transformRunCommands(
// file_uuid,
// e_c.map(c => (c[0] === '/' ? c.slice(1) : c))
// ),
// }
// else {
// if (typeof event.run_command.command === 'string')
// event.run_command.command = [event.run_command.command]
// if (Array.isArray(event.run_command.command))
// event.run_command.command.push(
// ...(await transformRunCommands(
// file_uuid,
// e_c.map(c => (c[0] === '/' ? c.slice(1) : c))
// ))
// )
// }
// }
} else if (e_c !== undefined) {
createErrorNotification(
new Error(
Expand Down
2 changes: 1 addition & 1 deletion app/shared/app_version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* Current bridge. app version
*/
export default 'v1.8.4'
export default 'v1.8.5'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge",
"version": "1.8.4",
"version": "1.8.5",
"private": true,
"author": "solvedDev <[email protected]>",
"description": "A powerful add-on editor",
Expand Down

0 comments on commit f7cd8ef

Please sign in to comment.