Skip to content

Commit a055586

Browse files
committed
fix code warning by adding guard before defining reader for instance variable
1 parent b234dea commit a055586

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
This document provides a curated view of the changes to Asciidoctor Reducer in each release.
55
For a detailed view of what has changed, refer to the {url-repo}/commits/main[commit history] on GitHub.
66

7+
== Unreleased
8+
9+
=== Fixed
10+
11+
* Don't define reader for source_header_attributes instance variable if already defined
12+
* Only catch RangeError when flattening list when using Opal runtime
13+
714
== 1.1.1 (2025-03-27) - @mojavelinux
815

916
=== Fixed

lib/asciidoctor/reducer/header_attribute_tracker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module Asciidoctor::Reducer
44
module HeaderAttributeTracker
55
def self.extended instance
6+
return if instance.singleton_class.method_defined? :source_header_attributes
67
instance.singleton_class.send :attr_reader, :source_header_attributes
78
end
89

0 commit comments

Comments
 (0)