Skip to content

Commit fbb1bdd

Browse files
committed
change substr() to substring() for performance
a jsperf comparing the two: http://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/14
1 parent b3acd9c commit fbb1bdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ var Raven = {
235235
function triggerEvent(eventType, options) {
236236
var event, key;
237237

238-
eventType = 'raven' + eventType.substr(0,1).toUpperCase() + eventType.substr(1);
238+
eventType = 'raven' + eventType.substring(0,1).toUpperCase() + eventType.substring(1);
239239

240240
if (document.createEvent) {
241241
event = document.createEvent('HTMLEvents');

0 commit comments

Comments
 (0)