Skip to content

Commit 5a81917

Browse files
committed
Another changes typo fix
1 parent 80b8d7f commit 5a81917

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stdlib",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"factorio_version": "0.17",
55
"title": "Factorio Standard Library",
66
"author": "Afforess",

stdlib/event/changes.lua

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ setmetatable(Changes, require('__stdlib__/stdlib/core'))
3232
old_version :: string: Old version of the mod. May be nil if the mod wasn't previously present (i.e. it was just added).
3333
new_version :: string: New version of the mod. May be nil if the mod is no longer present (i.e. it was just removed).
3434
--]]
35-
3635
local table = require('__stdlib__/stdlib/utils/table')
3736

3837
local map_changes = {
@@ -106,18 +105,16 @@ function Changes.on_configuration_changed(event)
106105
end
107106

108107
function Changes.on_mod_changed(this_mod_changes)
109-
if Changes.mod_versions then
110-
global._changes = global._changes or {}
108+
global._changes = global._changes or {}
111109

112-
local old = this_mod_changes.old_version
113-
if old then -- Find the last installed version
114-
for _, path in pairs(Changes.versions) do
115-
for ver, func in pairs(path) do
116-
if not global._changes[ver] then
117-
run_if_exists(func)
118-
global._changes[ver] = old
119-
log('Migration completed for version ' .. ver)
120-
end
110+
local old = this_mod_changes.old_version
111+
if old then -- Find the last installed version
112+
for _, path in pairs(Changes.mod_versions) do
113+
for ver, func in pairs(path) do
114+
if not global._changes[ver] then
115+
run_if_exists(func)
116+
global._changes[ver] = old
117+
log('Migration completed for version ' .. ver)
121118
end
122119
end
123120
end

0 commit comments

Comments
 (0)