Fixed duplicate variables

This commit is contained in:
jos 2016-09-17 15:23:31 +02:00
parent d235425f36
commit 83ae2bab07
3 changed files with 12 additions and 12 deletions

View File

@ -48,7 +48,7 @@ var compiler = webpack({
},
plugins: [
bannerPlugin,
new webpack.optimize.UglifyJsPlugin()
// new webpack.optimize.UglifyJsPlugin()
],
module: {
loaders: loaders
@ -71,7 +71,7 @@ var compilerMinimalist = webpack({
bannerPlugin,
new webpack.IgnorePlugin(new RegExp('^brace$')),
new webpack.IgnorePlugin(new RegExp('^ajv')),
new webpack.optimize.UglifyJsPlugin()
// new webpack.optimize.UglifyJsPlugin()
],
module: {
loaders: loaders

View File

@ -23,19 +23,19 @@
"test": "ava test/*.test.js test/**/*.test.js --verbose"
},
"dependencies": {
"ajv": "4.5.0",
"ajv": "4.7.0",
"brace": "0.8.0",
"javascript-natural-sort": "0.7.1",
"lodash": "4.15.0",
"preact": "5.7.0"
"preact": "6.0.2"
},
"devDependencies": {
"ava": "0.16.0",
"babel-core": "6.13.2",
"babel-core": "6.14.0",
"babel-loader": "6.2.5",
"babel-preset-stage-2": "6.13.0",
"babel-preset-stage-3": "6.11.0",
"css-loader": "0.23.1",
"css-loader": "0.25.0",
"gulp": "3.9.1",
"gulp-shell": "0.5.2",
"gulp-util": "3.0.7",

View File

@ -195,18 +195,18 @@ export default class JSONNode extends Component {
renderValue (value) {
const escapedValue = escapeHTML(value)
const type = valueType (value)
const isUrl = isUrl(value)
const itsAnUrl = isUrl(value)
const isEmpty = escapedValue.length === 0
return h('div', {
class: JSONNode.getValueClass(type, isUrl, isEmpty),
class: JSONNode.getValueClass(type, itsAnUrl, isEmpty),
contentEditable: 'true',
spellCheck: 'false',
onBlur: this.handleChangeValue,
onInput: this.updateValueStyling,
onClick: this.handleClickValue,
onKeyDown: this.handleKeyDownValue,
title: isUrl ? URL_TITLE : null
title: itsAnUrl ? URL_TITLE : null
}, escapedValue)
}
@ -218,7 +218,7 @@ export default class JSONNode extends Component {
updateValueStyling = (event) => {
const value = this.getValueFromEvent(event)
const type = valueType (value)
const isUrl = isUrl(value)
const itsAnUrl = isUrl(value)
const isEmpty = false // not needed, our div has a border and is clearly visible
// find the editable div, the root
@ -227,8 +227,8 @@ export default class JSONNode extends Component {
target = target.parentNode
}
target.className = JSONNode.getValueClass(type, isUrl, isEmpty)
target.title = isUrl ? URL_TITLE : ''
target.className = JSONNode.getValueClass(type, itsAnUrl, isEmpty)
target.title = itsAnUrl ? URL_TITLE : ''
// remove all classNames from childs (needed for IE and Edge)
JSONNode.removeChildClasses(target)