From 4b705bb1c4886e197d0e8dfcc291fb3308238372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20=C3=85str=C3=B6m?= Date: Wed, 9 Mar 2016 19:55:00 +0100 Subject: [PATCH] fix(symbol): treat `null` value the same as `undefined` Fixes #13 --- src/symbol.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/symbol.js b/src/symbol.js index 362f5b0..24ca9ff 100644 --- a/src/symbol.js +++ b/src/symbol.js @@ -248,7 +248,7 @@ import {PLATFORM} from 'aurelia-pal'; descriptor.value = function () { var str = toString.call(this), - tst = typeof this === 'undefined' ? undefined : this[Symbol.toStringTag] + tst = typeof this === 'undefined' || this === null ? undefined : this[Symbol.toStringTag] ; return typeof tst === 'undefined' ? str : ('[object ' + tst + ']'); };