Skip to content

Commit

Permalink
[MainUI] Lint code
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Jan 8, 2023
1 parent 61d09d0 commit c6a9f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function defineOHBlocks_Persistence (f7, isGraalJs) {
let skipPrevious = javascriptGenerator.valueToCode(block, 'skipPrevious', javascriptGenerator.ORDER_NONE)
skipPrevious = ((skipPrevious === 'undefined') ? false : skipPrevious)

let itemCode = (isGraalJs) ? `items.getItem(${itemName})` : `itemRegistry.getItem(${itemName})`
let itemCode = (isGraalJs) ? `items.getItem(${itemName})` : `itemRegistry.getItem(${itemName})`
switch (methodName) {
case 'maximumSince':
case 'minimumSince':
Expand All @@ -106,12 +106,12 @@ export default function defineOHBlocks_Persistence (f7, isGraalJs) {
break

case 'previousState':
code = (isGraalJs) ? `${itemCode}.history.${methodName}(${skipPrevious})` : `${persistence}.previousState(${itemCode},${skipPrevious}).getState()`
code = (isGraalJs) ? `${itemCode}.history.${methodName}(${skipPrevious})` : `${persistence}.previousState(${itemCode},${skipPrevious}).getState()`
break

case 'previousStateTime':
code = (isGraalJs) ? `${itemCode}.history.previousStateTimestamp(${skipPrevious})` : `${persistence}.previousState(${itemCode},${skipPrevious}).getTimestamp()`
break;
code = (isGraalJs) ? `${itemCode}.history.previousStateTimestamp(${skipPrevious})` : `${persistence}.previousState(${itemCode},${skipPrevious}).getTimestamp()`
break

default:
dayInfo = javascriptGenerator.valueToCode(block, 'dayInfo', javascriptGenerator.ORDER_NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,6 @@ var events = runtime.events;
`
let copyPastePluginInitialized = false
export default {
props: ['blocks', 'libraryDefinitions', 'isGraalJs'],
data () {
Expand All @@ -1003,7 +1001,7 @@ export default {
}
},
watch: {
isGraalJs: function() {
isGraalJs: function () {
this.initBlockly(this.blockLibraries)
}
},
Expand Down Expand Up @@ -1095,7 +1093,6 @@ export default {
Blockly.Msg['CROSS_TAB_COPY'] = 'Cross-Rule-Copy'
Blockly.Msg['CROSS_TAB_PASTE'] = 'Cross-Rule-Paste'
copyPastePluginInitialized = true
}
this.registerLibraryCallbacks(libraryDefinitions)
Expand Down

0 comments on commit c6a9f7e

Please sign in to comment.