Skip to content

Commit dd657d2

Browse files
committed
feat: Remove unused import and refactor function call to queryElements in src/index.js
- Removed unused import of queryDocumentSelector, queryDocumentSelectorAll, and getElements from '@cocreate/utils' - Refactored the function call from getElements to queryElements in the `render` function
1 parent 607edee commit dd657d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
import Actions from '@cocreate/actions';
33
import Observer from '@cocreate/observer';
44
import uuid from '@cocreate/uuid';
5-
import { queryDocumentSelector, queryDocumentSelectorAll, getElements, getValueFromObject, dotNotationToObject, ObjectId } from '@cocreate/utils';
5+
import { queryElements, getValueFromObject, dotNotationToObject, ObjectId } from '@cocreate/utils';
66
import '@cocreate/element-prototype';
77
import './index.css';
88

99
const sources = new Map()
1010
const renderedNodes = new Map()
11-
const deletedNodes = new Map()
1211
const elementSelector = '[render-selector], [render-closest], [render-parent], [render-next], [render-previous]'
1312

1413
function init(element) {
@@ -478,7 +477,7 @@ function getRenderValue(node, data, key, renderAs) {
478477
function render({ source, element, data, key, index, currentIndex, update, remove }) {
479478
if (!element) {
480479
if (source) {
481-
element = getElements(source, 'render')
480+
element = queryElements(source, 'render')
482481
if (!element)
483482
element = source.querySelector('template, [template], .template', '[render]')
484483
}

0 commit comments

Comments
 (0)