aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html
diff options
context:
space:
mode:
authorTanner Dolby <tannercdolby@gmail.com>2022-02-22 01:49:36 -0800
committerGitHub <noreply@github.com>2022-02-22 17:49:36 +0800
commit6e9fe98036090a37cc6247b873845505e5b512fb (patch)
tree5fc00117ddfd9f448eb9e8011b5bd7f6d8000e8d /files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html
parent70c3e11f3335e7701325f125fd712c84d6c1f9bf (diff)
downloadtranslated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.gz
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.bz2
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.zip
Removes empty <div> or <p> elements from pages (#3093)
* Removes all empty paragraph elements * Removes all empty div elements * Preserve empty div in code snippet * Preserve empty elements inside code snippets * Remove fr files which were converted into markdown * Web/CSS/transform-function/scaleX()/index.html The file is already renamed to index.md。 * remove not needed file * Resolve remaining conflict Co-authored-by: julieng <julien.gattelier@gmail.com> Co-authored-by: Masahiro FUJIMOTO <mfujimot@gmail.com>
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html b/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html
index 4e50535f20..665c71f1f1 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/promise/resolve/index.html
@@ -11,9 +11,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Promise/resolve
<div><code><strong>Promise.resolve(value)</strong></code>方法返回一个以给定值解析后的{{jsxref("Promise")}} 对象。如果这个值是一个 promise ,那么将返回这个 promise ;如果这个值是thenable(即带有{{jsxref("Promise.then", "\"then\" ")}}方法),返回的promise会“跟随”这个thenable的对象,采用它的最终状态;否则返回的promise将以此值完成。此函数将类promise对象的多层嵌套展平。</div>
-<div></div>
-<div></div>
+
+
<div class="warning">
<p><strong>警告:</strong>不要在解析为自身的thenable 上调用<code>Promise.resolve</code>。这将导致无限递归,因为它试图展平无限嵌套的promise。一个例子是将它与Angular中的异步管道一起使用。在<a href="https://angular.io/guide/template-syntax#avoid-side-effects">此处</a>了解更多信息。</p>