The relevant line from the SVG specification, regarding filling paths:
The fill operation fills open subpaths by performing the fill operation as if an additional "closepath" command were added to the path to connect the last point of the subpath with the first point of the subpath.
So, as far as the fill is concerned, there's an implicit "Z" at the end. However, for the stroke, there's no implied closure, so it won't draw a stroke connecting the last point to the first point unless you explicitly add a "Z".
If you only want to apply a stroke, use CSS to disable the fill:
path {
fill: none;
stroke: #000;
stroke-width: 1.5px;
}
(I see you answered your own question, but I thought others might still find an explanation useful.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…