Skip to content

Commit 0ac3231

Browse files
authored
Merge pull request #805 from gavinjerman/dev-article-type
Fix for Article.type always returning an empty string.
2 parents de28c3f + 6e10918 commit 0ac3231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Ignite/Framework/Article.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public struct Article {
158158
self.path = metadata["path"] as? String ?? deployPath
159159

160160
// Save the first subfolder in the path as the article's type
161-
let pathParts = path.split(separator: "/") // removes empty
161+
let pathParts = path.split(separator: "/").map { String($0) } // removes empty
162162
if pathParts.count > 1 { // no type if not in subdirectory
163163
metadata["type"] = pathParts[0]
164164
}

0 commit comments

Comments
 (0)