Matt-Esch/virtual-dom

UnsupportedValueType missing + after errorString(data.Vnode)

watzak opened this issue · 0 comments

Check => https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/index.js

Problem
In following method is a + for concatenation missing after errorString(data.received)

Solution
function UnsupportedValueType(data) {
var err = new Error();

err.type = 'virtual-hyperscript.unsupported.value-type';
err.message = 'Unexpected value type for input passed to h().\n' +
    'Expected a ' +
    errorString(data.expected) +
    ' but got:\n' +
    errorString(data.received) +
    '.\n' +
    'The vnode is:\n' +
    errorString(data.Vnode) +
    '\n' +
    'Suggested fix: Cast the value passed to h() to a string using String(value).';
err.Vnode = data.Vnode;

return err;

}