@@ -142,7 +142,6 @@ function countContentTypes(rootContainer: ContentTypeCollectionInterface, count?
142
142
function render ( message : { stageId : string , tree : TreeItem } ) {
143
143
return new Promise ( ( resolve , reject ) => {
144
144
createRenderTree ( message . stageId , message . tree ) . then ( ( rootContainer : ContentTypeCollectionInterface ) => {
145
- console . log ( "createRenderTree" ) ;
146
145
const element = document . createElement ( "div" ) ;
147
146
/**
148
147
* Setup an event on the element to observe changes and count the expected amount of content types are
@@ -156,12 +155,13 @@ function render(message: {stageId: string, tree: TreeItem}) {
156
155
157
156
// Combine this event with our engine waitForRenderFinish to ensure rendering is completed
158
157
$ . when ( engine . waitForFinishRender ( ) , renderFinished ) . then ( ( ) => {
159
- console . log ( "count " + countContentTypes ( rootContainer ) ) ;
160
158
observer . disconnect ( ) ;
161
- ko . cleanNode ( element ) ;
162
- const filtered : JQuery = filterHtml ( $ ( element ) ) ;
163
- const output = decodeAllDataUrlsInString ( filtered . html ( ) ) ;
164
- resolve ( output ) ;
159
+ _ . defer ( ( ) => {
160
+ ko . cleanNode ( element ) ;
161
+ const filtered : JQuery = filterHtml ( $ ( element ) ) ;
162
+ const output = decodeAllDataUrlsInString ( filtered . html ( ) ) ;
163
+ resolve ( output ) ;
164
+ } ) ;
165
165
} ) ;
166
166
167
167
ko . applyBindingsToNode (
@@ -199,7 +199,6 @@ function createRenderTree(
199
199
tree . data ,
200
200
parent !== null ? tree . children . length : null ,
201
201
) . then ( ( contentType : ContentTypeCollectionInterface ) => {
202
- console . log ( "content type" ) ;
203
202
// Ensure we retain the original tree ID's
204
203
contentType . id = tree . id ;
205
204
if ( tree . children . length > 0 ) {
0 commit comments