Skip to content

Commit d7e6345

Browse files
committed
Ensure default name for Record in toString
Just in case constructor.name is not defined (it is not specced, to be fair), we fall back to a known string. Fixes immutable-js#383
1 parent bc99942 commit d7e6345

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

dist/immutable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3880,7 +3880,7 @@
38803880
}
38813881

38823882
function recordName(record) {
3883-
return record._name || record.constructor.name;
3883+
return record._name || record.constructor.name || 'Record';
38843884
}
38853885

38863886
function deepEqual(a, b) {

0 commit comments

Comments
 (0)