OpenC3/cosmos

View on GitHub
openc3-cosmos-init/plugins/packages/openc3-cosmos-ace-diff/src/visuals/getTheme.js

Summary

Maintainability
B
5 hrs
Test Coverage
import C from '../constants.js'

export default function getTheme(acediff, editor) {
  let { theme } = acediff.options
  if (editor === C.EDITOR_LEFT && acediff.options.left.theme !== null) {
    theme = acediff.options.left.theme
  }
  if (editor === C.EDITOR_RIGHT && acediff.options.right.theme !== null) {
    theme = acediff.options.right.theme
  }
  return theme
}