File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
contentcuration/contentcuration/frontend/channelEdit/components/Clipboard Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 252252 const contentNodesValues = Object .values (this .contentNodesMap );
253253 this .selectedNodeIds .forEach (id => {
254254 const node = this .clipboardNodesMap [id];
255- let kind = node? .kind ;
255+ let kind = node .kind ;
256256 // Check contentNodesMap for node kind if missing in clipboardNodesMap
257- if (! kind && node? .source_node_id ) {
257+ if (! kind && node .source_node_id ) {
258258 const contentNode = contentNodesValues .find (n => n .node_id === node .source_node_id );
259- kind = contentNode? .kind ;
259+ kind = contentNode .kind ;
260260 }
261261
262262 if (kind === ' topic' ) {
263263 topicCount++ ;
264- } else {
264+ } else if (kind) {
265265 resourceCount++ ;
266+ } else {
267+ console .error (' `kind` missing from content.' );
266268 }
267269 });
268270 return { topicCount: topicCount, resourceCount: resourceCount };
You can’t perform that action at this time.
0 commit comments