From 32cb1cf1ba99807715ab5a4184f62e39c47d18f7 Mon Sep 17 00:00:00 2001 From: Blink WPT Bot Date: Wed, 8 Jan 2020 06:54:13 -0800 Subject: [PATCH] [webnfc] NDEFScanOptions#mediaType being undefined means do not filter (#21017) And the empty string should just match on empty. The spec change: https://github.com/w3c/web-nfc/pull/496 https://github.com/w3c/web-nfc/pull/498 BUG=520391 Change-Id: Idae55b976a6fbbdd252f6227cbe13ee50d16269c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1986632 Reviewed-by: Rijubrata Bhaumik Reviewed-by: Daniel Cheng Commit-Queue: Leon Han Cr-Commit-Position: refs/heads/master@{#728813} Co-authored-by: Han Leon --- resources/chromium/nfc-mock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/chromium/nfc-mock.js b/resources/chromium/nfc-mock.js index 2c1724b7592eb1..5cac21bc076f41 100644 --- a/resources/chromium/nfc-mock.js +++ b/resources/chromium/nfc-mock.js @@ -133,7 +133,7 @@ function matchesWatchOptions(message, options) { options.recordType !== record.recordType) { continue; } - if (options.mediaType !== '' && options.mediaType !== record.mediaType) { + if (options.mediaType != null && options.mediaType !== record.mediaType) { continue; }