Skip to content

Commit

Permalink
try2
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Jan 17, 2025
1 parent edd7098 commit 1d18085
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/function/getRemoteImage.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
{{- end -}}

{{- if (eq $suffixList false) | or $valid -}}
{{- with try $remoteResource := resources.GetRemote . -}}
{{- with try resources.GetRemote . -}}
{{- with .Err -}}
{{- warnf "%s" . -}}
{{ else }}
{{- if eq $remoteResource.ResourceType "image" -}}
{{- $resource = $remoteResource -}}
{{- if eq .Value.ResourceType "image" -}}
{{- $resource = .Value -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/plugin/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
{{- $optimise := .Optimise | default site.Params.image.optimise | default false -}}

{{- if not $resource | and $isUrlRemote | and $cacheRemote -}}
{{- with try $remoteResource := resources.GetRemote .Src -}}
{{- with try resources.GetRemote .Src -}}
{{- with .Err -}}
{{- warnf "%s" . -}}
{{ else }}
{{- if $remoteResource.ResourceType | eq "image" -}}
{{- $resource = $remoteResource -}}
{{- if .Value.ResourceType | eq "image" -}}
{{- $resource = .Value -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 1d18085

Please sign in to comment.