Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleCodeChange = code => {
const {type, onChange} = this.props
const path = ['code']
const fixedLanguage = get(type, 'options.language')
onChange(PatchEvent.from([
setIfMissing({_type: type.name, language: fixedLanguage}),
code ? set(code, path) : unset(path)
]))
}