Skip to content

Commit 3cf9c72

Browse files
authored
Use Blog.restApiRootURL in GutenbergKit (#24666)
1 parent 6af4f4f commit 3cf9c72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ extension NewGutenbergViewController {
842842

843843
extension EditorConfiguration {
844844
init(blog: Blog) {
845-
let selfHostedApiUrl = blog.url(withPath: "wp-json/")
845+
let selfHostedApiUrl = blog.restApiRootURL ?? blog.url(withPath: "wp-json/")
846846
let isWPComSite = blog.isHostedAtWPcom || blog.isAtomic()
847847
let siteApiRoot = blog.isAccessibleThroughWPCom() && isWPComSite ? blog.wordPressComRestApi?.baseURL.absoluteString : selfHostedApiUrl
848848
let siteId = blog.dotComID?.stringValue

0 commit comments

Comments
 (0)