Skip to content

Commit

Permalink
fix: prevent duplicate notifier dependencies being added
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench committed Jul 23, 2020
1 parent 1c2594f commit 5dd288a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Notifier @JvmOverloads constructor(
var url: String = "https://bugsnag.com"
) : JsonStream.Streamable {

val dependencies = mutableListOf<Notifier>()
var dependencies = listOf<Notifier>()

@Throws(IOException::class)
override fun toStream(writer: JsonStream) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class NotifierSerializationTest {
deps.version = "4.5.6"
deps.name = "CustomNotifier"
deps.url = "https://example.com"
deps.dependencies.add(notifier)
deps.dependencies = listOf(notifier)
return generateSerializationTestCases("notifier", notifier, deps)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class BugsnagReactNativePlugin : Plugin {
notifier.name = "Bugsnag React Native"
notifier.url = "https://github.com/bugsnag/bugsnag-js"
notifier.version = jsVersion
notifier.dependencies.add(Notifier()) // depend on bugsnag-android
client.notifier.dependencies = listOf(Notifier()) // depend on bugsnag-android
}

private fun ignoreJavaScriptExceptions() {
Expand Down

0 comments on commit 5dd288a

Please sign in to comment.