Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9f500f3

Browse files
committed
refactor & make jshint & jscs happy
1 parent ef52432 commit 9f500f3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/Angular.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ function stringify(value) {
19421942
value = '' + value;
19431943
break;
19441944
default:
1945-
if (isFunction(value.toString) && value.toString !== Object.prototype.toString && !isArray(value)) {
1945+
if (hasCustomToString(value) && !isArray(value)) {
19461946
value = value.toString();
19471947
} else {
19481948
value = toJson(value);

src/ngMessageFormat/messageFormatCommon.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ var $interpolateMinErr = window['angular']['$interpolateMinErr'];
99

1010
var noop = window['angular']['noop'],
1111
isFunction = window['angular']['isFunction'],
12-
toJson = window['angular']['toJson'];
12+
toJson = window['angular']['toJson'],
13+
isArray = window['angular']['isArray'];
1314

1415
function stringify(value) {
1516
if (value == null) { // null || undefined

test/ng/interpolateSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('$interpolate', function() {
3737

3838
it('should use custom toString when present', inject(function($interpolate, $rootScope) {
3939
var context = {
40-
a : {
40+
a: {
4141
toString: function() {
4242
return 'foo';
4343
}

0 commit comments

Comments
 (0)