Skip to content

Commit e6c6976

Browse files
Fix wrong update warnings. Fixes #24
1 parent 188e361 commit e6c6976

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Resources/ExtensionResource.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function toArray($request): array
2525

2626
$attributes['possible_versions'] = $possibleVersions;
2727
// We know possible_versions are sorted from lowest to highest in the task
28-
$attributes['update_available'] = Comparator::greaterThan($this->resource->last_version, Arr::last($possibleVersions));
28+
// We need to trim the "v" in front of version because it creates issue if one of the versions has it and another doesn't
29+
$attributes['update_available'] = Comparator::greaterThan(trim($this->resource->last_version, 'v'), trim(Arr::last($possibleVersions), 'v'));
2930
}
3031

3132
return [

0 commit comments

Comments
 (0)