0?n:e)(t)}},function(t,u){t.exports=function(t,u,e,n){if(!(t instanceof u)||void 0!==n&&n in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,u){t.exports=!1},function(t,u,e){var n=e(1),r=e(107),o=e(67),i=e(79)("IE_PROTO"),a=function(){},c=function(){var t,u=e(66)("iframe"),n=o.length;for(u.style.display="none",e(69).appendChild(u),u.src="javascript:",t=u.contentWindow.document,t.open(),t.write("
+
diff --git a/package.json b/package.json
index 0d8506c..bc4b0e3 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,8 @@
"generate": "babel src -d lib",
"watch": "webpack --progress --watch",
"build": "webpack --progress --production",
- "story": "ascesis-storybook"
+ "story": "ascesis-storybook",
+ "postinstall": "npm run generate"
},
"dependencies": {
"document-register-element": "^1.5.0",
diff --git a/src/object-inspector/ObjectPreview.js b/src/object-inspector/ObjectPreview.js
index 2a23b83..c2a8654 100644
--- a/src/object-inspector/ObjectPreview.js
+++ b/src/object-inspector/ObjectPreview.js
@@ -28,7 +28,7 @@ class ObjectPreview extends HTMLElement {
}
connectedCallback() {
- this.maxProperties = this.getAttribute('max-properties') || 5;
+ this.maxProperties = this.getAttribute('max-properties') || 3;
this._data = (this.getAttribute('data') || 'null');
const data = parse(this._data);
this.data = data;
@@ -59,6 +59,8 @@ class ObjectPreview extends HTMLElement {
}]
`);
+ } else if (typeof object === 'string') {
+ return ``;
} else {
let propertyNodes = [];
for (let propertyName in object) {
diff --git a/src/tree-view/TreeNode.js b/src/tree-view/TreeNode.js
index b29ebb1..7ed5da5 100644
--- a/src/tree-view/TreeNode.js
+++ b/src/tree-view/TreeNode.js
@@ -72,7 +72,7 @@ class TreeNode extends HTMLElement {
${this.expandable
? ``
- : (this.shouldShowPlaceholder) && ` `}
+ : this.shouldShowPlaceholder ? ` ` : ''}
${renderedNode}