Matt-Esch / virtual-dom

A Virtual DOM and diffing algorithm
MIT License
11.67k stars 777 forks source link

UnsupportedValueType missing + after errorString(data.Vnode) #410

Open watzak opened 8 years ago

watzak commented 8 years ago

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;

}