Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (typeof this.props.className !== 'undefined') {
if (this.lastClass) {
node.className = node.className.replace(this.lastClass, ' ');
}
this.lastClass = this.props.className.trim();
node.className = node.className.trim() + ' ' + this.lastClass;
}
if (!ons) {
throw new Error("react-onsenui requires `onsenui`, make sure you are loading it with `import onsenui` or `require('onsenui')` before using the components");
}
ons._autoStyle.prepare(node);
}
if (typeof this.props.className !== 'undefined') {
if (this.lastClass) {
node.className = node.className.replace(this.lastClass, ' ');
}
this.lastClass = ' ' + this.props.className.trim();
node.className = node.className.trim() + this.lastClass;
}
if (!ons) {
throw new Error("react-onsenui requires `onsenui`, make sure you are loading it with `import onsenui` or `require('onsenui')` before using the components");
}
ons._autoStyle.prepare(node);
}