We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 00eef8d + 9942822 commit 4391242Copy full SHA for 4391242
src/raven.js
@@ -424,7 +424,7 @@ function isFunction(what) {
424
}
425
426
function isString(what) {
427
- return typeof what === 'string';
+ return objectPrototype.toString.call(what) === '[object String]';
428
429
430
function isObject(what) {
test/raven.test.js
@@ -209,6 +209,8 @@ describe('globals', function() {
209
describe('isString', function() {
210
it('should do as advertised', function() {
211
assert.isTrue(isString(''));
212
+ assert.isTrue(isString(String('')));
213
+ assert.isTrue(isString(new String('')));
214
assert.isFalse(isString({}));
215
assert.isFalse(isString(undefined));
216
assert.isFalse(isString(function(){}));
0 commit comments