Skip to content

Commit

Permalink
Fixes #391
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasrueedlinger authored and andreasrueedlinger committed Oct 14, 2016
1 parent fecb8c5 commit 63877da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serializers/text/binding_serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function serializeBinding(
let _b: any = binding;

props.forEach((prop) => {
if (_b[prop] !== undefined && _b[prop] !== null) {
if (_b[prop] !== undefined) {
let val: any = _b[prop];
switch (prop) {
case "type":
Expand All @@ -30,7 +30,7 @@ function serializeBinding(
val = scopeFormatter(_b[prop]);
break;
case "implementationType":
val = _b[prop].name;
val = _b[prop] && _b[prop].name;
break;
case "serviceIdentifier":
val = serviceIdentifierFormatter(_b[prop]);
Expand Down
1 change: 1 addition & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ describe("makeLoggerMiddleware", () => {
" └── bindings\n" +
" └── Binding<Symbol(MyStringValue)> : 0\n" +
" └── type : ConstantValue\n" +
" └── implementationType : null\n" +
" └── scope : Transient\n";

let lines = out.split("└── ")
Expand Down

0 comments on commit 63877da

Please sign in to comment.