Repository: prettier/plugin-xml (js)

Issue:
TypeError: Cannot read property 'startLine' of undefined (v0.13.0)
I get the following error if i try to update to newest version

```

$ prettier "{**/*,*}.*" -u --list-different
--
1183 | [error] dir\file.xml: TypeError: Cannot read property 'startLine' of undefined
1184 | [error]     at Object.element (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:336:34)
1185 | [error]     at Object.genericPrint [as print] (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:412:30)
1186 | [error]     at callPluginPrintFunction (C:\drone\src\node_modules\prettier\index.js:14718:18)
1187 | [error]     at C:\drone\src\node_modules\prettier\index.js:14649:47
1188 | [error]     at Object.printComments (C:\drone\src\node_modules\prettier\index.js:14305:19)
1189 | [error]     at printGenerically (C:\drone\src\node_modules\prettier\index.js:14649:22)
1190 | [error]     at FastPath.call (C:\drone\src\node_modules\prettier\index.js:14441:20)
1191 | [error]     at C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:308:27
1192 | [error]     at Array.map (<anonymous>)
1193 | [error]     at Object.element (C:\drone\src\node_modules\@prettier\plugin-xml\src\printer.js:304:19)


```

*dir\file.xml*
```yml
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Event>
    <Process id="XXX.Notification">

    </Process>
    <!--<Process id="XXX.Notification.Tmpl" >
        <Condition>[v:NType] == 'Tmpl'</Condition>
    </Process>-->
</Event>

```

Pull request description:
fix: check for empty array
Check for undefined

fixes #158

Patch:
diff --git a/src/printer.js b/src/printer.js
index 32bba52..6f86b91 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -332,6 +332,11 @@ const nodes = {
         );
       }
 
+      if (children.length === 0) {
+        const space = opts.xmlSelfClosingSpace ? line : softline;
+        return group(concat(parts.concat(space, "/>")));
+      }
+
       const docs = [];
       let lastLine = children[0].startLine;
 


Test patch:
diff --git a/test/__snapshots__/format.test.js.snap b/test/__snapshots__/format.test.js.snap
index cc3983e..1d406f8 100644
--- a/test/__snapshots__/format.test.js.snap
+++ b/test/__snapshots__/format.test.js.snap
@@ -24,6 +24,7 @@ exports[`defaults 1`] = `
   <?pagebreak?>
 
   <style />
+  <style> </style>
   <style type=\\"text/css\\">
 circle {
   stroke-opacity: 0.7;
@@ -87,6 +88,7 @@ exports[`xmlWhitespaceSensitivity => ignore 1`] = `
   </desc>
   <?pagebreak?>
 
+  <style />
   <style />
   <style type=\\"text/css\\">
 circle {
diff --git a/test/fixture.xml b/test/fixture.xml
index 9868c95..c3594be 100644
--- a/test/fixture.xml
+++ b/test/fixture.xml
@@ -21,6 +21,7 @@
   <?pagebreak?>
 
   <style></style>
+  <style> </style>
   <style type="text/css">
     circle          { stroke-opacity: 0.7; }
     .special circle { stroke: green; }