cleanup and apply editorconfig
This commit is contained in:
parent
8550501fb2
commit
2c3d3e5df0
2 changed files with 8 additions and 8 deletions
|
|
@ -55,7 +55,6 @@
|
||||||
"camelcase": 2,
|
"camelcase": 2,
|
||||||
"comma-spacing": 2,
|
"comma-spacing": 2,
|
||||||
"comma-style": 2,
|
"comma-style": 2,
|
||||||
"comma-dangle": [2, "never"],
|
|
||||||
"consistent-this": [2, "self"],
|
"consistent-this": [2, "self"],
|
||||||
"eol-last": 2,
|
"eol-last": 2,
|
||||||
"func-style": [2, "declaration"],
|
"func-style": [2, "declaration"],
|
||||||
|
|
|
||||||
15
mithril.js
15
mithril.js
|
|
@ -193,8 +193,8 @@
|
||||||
// version)
|
// version)
|
||||||
try {
|
try {
|
||||||
if (typeof data !== "boolean" &&
|
if (typeof data !== "boolean" &&
|
||||||
data != null &&
|
data != null &&
|
||||||
data.toString() != null) return data
|
data.toString() != null) return data
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// silently ignore errors
|
// silently ignore errors
|
||||||
}
|
}
|
||||||
|
|
@ -1101,9 +1101,9 @@
|
||||||
namespace
|
namespace
|
||||||
) {
|
) {
|
||||||
if (!(attrName in cachedAttrs) ||
|
if (!(attrName in cachedAttrs) ||
|
||||||
(cachedAttr !== dataAttr) ||
|
(cachedAttr !== dataAttr) ||
|
||||||
typeof dataAttr === "object" ||
|
typeof dataAttr === "object" ||
|
||||||
($document.activeElement === node)) {
|
($document.activeElement === node)) {
|
||||||
cachedAttrs[attrName] = dataAttr
|
cachedAttrs[attrName] = dataAttr
|
||||||
try {
|
try {
|
||||||
return setSingleAttr(
|
return setSingleAttr(
|
||||||
|
|
@ -1119,7 +1119,7 @@
|
||||||
if (e.message.indexOf("Invalid argument") < 0) throw e
|
if (e.message.indexOf("Invalid argument") < 0) throw e
|
||||||
}
|
}
|
||||||
} else if (attrName === "value" && tag === "input" &&
|
} else if (attrName === "value" && tag === "input" &&
|
||||||
node.value !== dataAttr) {
|
node.value !== dataAttr) {
|
||||||
// #348 dataAttr may not be a string, so use loose comparison
|
// #348 dataAttr may not be a string, so use loose comparison
|
||||||
node.value = dataAttr
|
node.value = dataAttr
|
||||||
}
|
}
|
||||||
|
|
@ -1352,7 +1352,8 @@
|
||||||
|
|
||||||
m.prop = function (store) {
|
m.prop = function (store) {
|
||||||
if ((store != null && (isObject(store) || isFunction(store)) ||
|
if ((store != null && (isObject(store) || isFunction(store)) ||
|
||||||
((typeof Promise !== "undefined") && (store instanceof Promise))) &&
|
((typeof Promise !== "undefined") &&
|
||||||
|
(store instanceof Promise))) &&
|
||||||
isFunction(store.then)) {
|
isFunction(store.then)) {
|
||||||
return propify(store)
|
return propify(store)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue