mirror of https://github.com/sveltejs/svelte
parent
e0917fd874
commit
596ab3a7fe
@ -1,7 +1,6 @@
|
|||||||
import { Node } from '../interfaces';
|
import { Node } from '../interfaces';
|
||||||
|
|
||||||
export default function getObject(node: Node) {
|
export default function getObject(node: Node) {
|
||||||
// TODO validation should ensure this is an Identifier or a MemberExpression
|
|
||||||
while (node.type === 'MemberExpression') node = node.object;
|
while (node.type === 'MemberExpression') node = node.object;
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
Loading…
Reference in new issue