diff options
Diffstat (limited to 'src/modules/optional/data.js')
-rw-r--r-- | src/modules/optional/data.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/optional/data.js b/src/modules/optional/data.js index 9986c3d..00bb8ea 100644 --- a/src/modules/optional/data.js +++ b/src/modules/optional/data.js @@ -24,9 +24,11 @@ export function data (a, v, r) { } } else { this.attr('data-' + a, - v === null ? null - : r === true || typeof v === 'string' || typeof v === 'number' ? v - : JSON.stringify(v) + v === null + ? null + : r === true || typeof v === 'string' || typeof v === 'number' + ? v + : JSON.stringify(v) ) } |