I SyntaxError: Unexpected token ")"only get in Safari - this code works in any other browser.
I use gulpto compile my files as follows:
browserify(componentPath + "app.jsx")
.transform(reactify)
.transform(babelify)
.bundle()
.pipe(source('app.js'))
.pipe(gulp.dest(buildPath));
A syntax error highlights the following:
return React.createElement(If, {
condition: !_.isEmpty(title)
}, React.createElement("div", {
className: "row wrapper border-bottom white-bg page-heading"
}, React.createElement("div", {
className: "col-lg-9"
}, React.createElement("h2", null, title || 'Untitled'), React.createElement("ol", {
className: "breadcrumb"
}, React.createElement("li", null, React.createElement("a", {
onClick: () => self.history.pushState(null, home)
}, "Home")), links.map(function(link, index) {
var url = link.url;
return React.createElement("li", {
onClick: () => self.history.pushState(null, url),
key: url,
className: "ptr-click"
}, index == links.length - 1 ? React.createElement("strong", null, link.title || 'Untitled') : link.title);
})))));
I commented on the entire section to see if it is this particular block of code, but then the error referred to another block exactly the same React.createElement.
source
share