Skip to content

Commit 00d0064

Browse files
committed
refactor(document): use template strings for error message re: code review
1 parent 99fb598 commit 00d0064

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/document.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,11 +1779,7 @@ Document.prototype.$__set = function(pathToMark, path, options, constructing, pa
17791779
Document.prototype.$__getValue = function(path) {
17801780
if (typeof path !== 'string' && !Array.isArray(path)) {
17811781
throw new TypeError(
1782-
'Invalid `path`. Must be either string or array. Got "' +
1783-
path +
1784-
'" (type ' +
1785-
typeof path +
1786-
')'
1782+
`Invalid \`path\`. Must be either string or array. Got "${path}" (type ${typeof path})`
17871783
);
17881784
}
17891785
return utils.getValue(path, this._doc);

0 commit comments

Comments
 (0)